From 05b44496528efb52cf5ce573625c2a77fb1c82ed Mon Sep 17 00:00:00 2001 From: Himani Gupta Date: Mon, 11 Jun 2018 15:50:19 +0530 Subject: [PATCH] [9610][7885][7872][7570] wlbt: Kernel Panic in slsi_lls_get_stats API. 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 --- drivers/net/wireless/scsc/nl80211_vendor.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/scsc/nl80211_vendor.c b/drivers/net/wireless/scsc/nl80211_vendor.c index 5be61acccd9a..2106dbe2280a 100755 --- a/drivers/net/wireless/scsc/nl80211_vendor.c +++ b/drivers/net/wireless/scsc/nl80211_vendor.c @@ -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) -- 2.20.1