mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-10 12:52:37 -05:00
qcacld-3.0: Ignore address change requests when interface is down
In some cases kernel incorrectly forwards the address change request down to the driver even when interface is down. Driver tries to get the session pointer from mac context and ends up crashing due to NULL pointer dereference. Ignore address change requests when interface is down. CRs-Fixed: 2060889 Change-Id: I2b572c517b335856cdf2ae04433b4a48a9598572
This commit is contained in:
parent
17c152af70
commit
c9045fedd0
1 changed files with 15 additions and 0 deletions
|
|
@ -224,6 +224,14 @@ static int __wlan_hdd_ipv6_changed(struct notifier_block *nb,
|
|||
if (errno)
|
||||
goto exit;
|
||||
|
||||
/* Ignore if the interface is down */
|
||||
if (!(ndev->flags & IFF_UP)) {
|
||||
hdd_err("Rcvd change addr request on %s(flags 0x%X)",
|
||||
ndev->name, ndev->flags);
|
||||
hdd_err("NETDEV Interface is down, ignoring...");
|
||||
goto exit;
|
||||
}
|
||||
|
||||
hdd_debug("invoking sme_dhcp_done_ind");
|
||||
sme_dhcp_done_ind(hdd_ctx->hHal, adapter->sessionId);
|
||||
schedule_work(&adapter->ipv6NotifierWorkQueue);
|
||||
|
|
@ -798,6 +806,13 @@ static int __wlan_hdd_ipv4_changed(struct notifier_block *nb,
|
|||
if (errno)
|
||||
goto exit;
|
||||
|
||||
/* Ignore if the interface is down */
|
||||
if (!(ndev->flags & IFF_UP)) {
|
||||
hdd_err("Rcvd change addr request on %s(flags 0x%X)",
|
||||
ndev->name, ndev->flags);
|
||||
hdd_err("NETDEV Interface is down, ignoring...");
|
||||
goto exit;
|
||||
}
|
||||
hdd_debug("invoking sme_dhcp_done_ind");
|
||||
sme_dhcp_done_ind(hdd_ctx->hHal, adapter->sessionId);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue