diff options
| author | Mukul Sharma <mukul@qti.qualcomm.com> | 2015-09-03 19:13:06 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-09-04 15:33:30 +0530 |
| commit | d4ee929928eafef95cf36e4b68820ef73b235fbd (patch) | |
| tree | cbb6e6fd4873287187313be0b0e55b336e1943e4 | |
| parent | 1eec1e3ba6df620b8b01f6a3d4042529d6227563 (diff) | |
qcacld-2.0: Validate hddctx in ndo (set_multicast_list) handler
If ndo set_multicast_list handler get invoked during unload time,
it may access already freed context, which will lead to crash.
Hence hdd ctx validation is required to prevent null data
access.
Change-Id: I3d384e72f171d969e3a4b55f8bad8a70c86656ae
CRs-Fixed: 901484
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index b7b2429a7ce5..62343ce09895 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -7721,12 +7721,17 @@ static void __hdd_set_multicast_list(struct net_device *dev) int mc_count; int i = 0; struct netdev_hw_addr *ha; + hdd_context_t *pHddCtx; ENTER(); if (VOS_FTM_MODE == hdd_get_conparam()) return; + pHddCtx = WLAN_HDD_GET_CTX(pAdapter); + if (0 != wlan_hdd_validate_context(pHddCtx)) + return; + /* Delete already configured multicast address list */ wlan_hdd_set_mc_addr_list(pAdapter, false); |
