summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDu Cheng <ducheng2@gmail.com>2021-04-08 00:27:56 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-14 08:24:18 +0200
commited13df88c6d5cb7c5463f1955b622ab246be1364 (patch)
tree00e40373d17367b1c01adc7a72598acce2a16600 /net
parent628ac886dfbab95b9636866b1cc2542929999f32 (diff)
downloadlinux-stable-ed13df88c6d5cb7c5463f1955b622ab246be1364.tar.gz
linux-stable-ed13df88c6d5cb7c5463f1955b622ab246be1364.tar.bz2
linux-stable-ed13df88c6d5cb7c5463f1955b622ab246be1364.zip
cfg80211: remove WARN_ON() in cfg80211_sme_connect
commit 1b5ab825d9acc0f27d2f25c6252f3526832a9626 upstream. 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@syzkaller.appspotmail.com Signed-off-by: Du Cheng <ducheng2@gmail.com> Link: https://lore.kernel.org/r/20210407162756.6101-1-ducheng2@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/sme.c2
1 files changed, 1 insertions, 1 deletions
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);