qcacld-3.0: Register the netdev notifier before the netdevices

Applications in the userspace can sleep on the RTM events from
the driver. One such application waiting of RTM_NEW_LINK indication
does interface up as soon as it recieves the indication, so the
kernel takes rtnl_lock to call the dev_open on the interface.
Load/unload of the driver and dev_open of the interfaces are
synchronized with hdd_init_deinit_lock. So the __hdd_open is waiting
on the hdd_init_deinit_lock which is currently held by the driver
loading context. After registering the interfaces driver goes to
register the netdev notifier which is blocked on the rtnl_lock
currently held by the dev_open resulting in deadlock.

To mitigate the issue register the netdev notifier before the
interfaces are registered.

Change-Id: Ibb0c187a43ad87fa535ff583316af430e1ddf04f
CRs-Fixed: 2078720
2 files changed
tree: 86b0ef7280e221d91b58da9a40a289c997b63871
  1. components/
  2. core/
  3. uapi/
  4. Android.mk
  5. Kbuild
  6. Kconfig
  7. Makefile
  8. README.txt