cfg80211: remove WARN_ON() in cfg80211_sme_connect
authorDu Cheng <ducheng2@gmail.com>
Wed, 7 Apr 2021 16:27:56 +0000 (00:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Apr 2021 09:59:09 +0000 (11:59 +0200)
commit8b334cdb7c4e6017d58bc9d015b69ab80bddfcc9
treeb9f8a88ce5ff25c30f1a1651892427a94bd936cc
parentfe9e15a30be666ec8071f325a39fe13e2251b51d
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>
net/wireless/sme.c