From: Himani Gupta Date: Mon, 11 Jun 2018 10:20:19 +0000 (+0530) Subject: [9610][7885][7872][7570] wlbt: Kernel Panic in slsi_lls_get_stats API. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=05b44496528efb52cf5ce573625c2a77fb1c82ed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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)