[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20210412162502.314854-38-sashal@kernel.org>
Date: Mon, 12 Apr 2021 12:25:00 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Du Cheng <ducheng2@...il.com>,
syzbot+5f9392825de654244975@...kaller.appspotmail.com,
Johannes Berg <johannes.berg@...el.com>,
Sasha Levin <sashal@...nel.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org
Subject: [PATCH AUTOSEL 5.4 38/39] cfg80211: remove WARN_ON() in cfg80211_sme_connect
From: Du Cheng <ducheng2@...il.com>
[ Upstream commit 1b5ab825d9acc0f27d2f25c6252f3526832a9626 ]
A WARN_ON(wdev->conn) would trigger in cfg80211_sme_connect(), if multiple
send_msg(NL80211_CMD_CONNECT) system calls are made from the userland, which
should be anticipated and handled by the wireless driver. Remove this WARN_ON()
to prevent kernel panic if kernel is configured to "panic_on_warn".
Bug reported by syzbot.
Reported-by: syzbot+5f9392825de654244975@...kaller.appspotmail.com
Signed-off-by: Du Cheng <ducheng2@...il.com>
Link: https://lore.kernel.org/r/20210407162756.6101-1-ducheng2@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@...el.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
net/wireless/sme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index d32a2ec4d96a..63f89687a018 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -530,7 +530,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
cfg80211_sme_free(wdev);
}
- if (WARN_ON(wdev->conn))
+ if (wdev->conn)
return -EINPROGRESS;
wdev->conn = kzalloc(sizeof(*wdev->conn), GFP_KERNEL);
--
2.30.2
Powered by blists - more mailing lists