mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
qcacld-3.0: Reject interface up request during removal of driver
During the driver unload driver de-registers the netdevices taking hdd_init_deinit_lock and if any userspace entity trying issues the interface taking the rtnl_lock resulting in the deadlock as one thread is waiting for the rtnl_lock to be released taking the hdd_init_deinit_lock and other thread is waiting for hdd_init_deinit_lock taking the rtnl_lock. Since the driver is unloading reject the interface up request before acquiring the hdd_init_deinit_lock. To address this issue do not proceed with hdd_open if unload is in progress. CRs-Fixed: 2078720 Change-Id: Ie8c8bba8d142312d3504c40a839343e16fc3b31e
This commit is contained in:
parent
1b5db77b70
commit
15a7db51d2
1 changed files with 6 additions and 0 deletions
|
|
@ -2403,6 +2403,12 @@ static int __hdd_open(struct net_device *dev)
|
|||
MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST,
|
||||
adapter->sessionId, adapter->device_mode));
|
||||
|
||||
/* Nothing to be done if device is unloading */
|
||||
if (cds_is_driver_unloading()) {
|
||||
hdd_err("Driver is unloading can not open the hdd");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
ret = wlan_hdd_validate_context(hdd_ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue