[9610][7885][7872][7570] wlbt: Kernel Panic in slsi_lls_get_stats API.
authorHimani Gupta <himani.g2@samsung.com>
Mon, 11 Jun 2018 10:20:19 +0000 (15:50 +0530)
committerTarun Karela <t.karela@samsung.com>
Fri, 22 Jun 2018 08:50:03 +0000 (09:50 +0100)
Unable to handle kernel null pointer dereference(sdev) in
slsi_lls_get_stats API.

Change-Id: I5bd7ddb7c1c131adf510b56eccb2ad0046970802
SCSC-Bug-Id:SSB-40679
Signed-off-by: Himani Gupta <himani.g2@samsung.com>
drivers/net/wireless/scsc/nl80211_vendor.c

index 5be61acccd9afeffbd7d198de8c7f6af57ecd2c9..2106dbe2280aa482b2410b97a4939b4c1cebbbf0 100755 (executable)
@@ -2831,6 +2831,11 @@ static int slsi_lls_get_stats(struct wiphy *wiphy, struct wireless_dev *wdev, co
                return -EOPNOTSUPP;
        }
 
+       if(!sdev) {
+               SLSI_ERR(sdev, "sdev is Null\n");
+               return -EINVAL;
+       }
+
        SLSI_MUTEX_LOCK(sdev->device_config_mutex);
        /* In case of lower layer failure do not read LLS MIBs */
        if (sdev->mlme_blocked)