Skip to content

Commit 1b5ab82

Browse files
Du Chengjmberg-intel
authored andcommitted
cfg80211: remove WARN_ON() in cfg80211_sme_connect
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: [email protected] Signed-off-by: Du Cheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 7d73cd9 commit 1b5ab82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/wireless/sme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ static int cfg80211_sme_connect(struct wireless_dev *wdev,
529529
cfg80211_sme_free(wdev);
530530
}
531531

532-
if (WARN_ON(wdev->conn))
532+
if (wdev->conn)
533533
return -EINPROGRESS;
534534

535535
wdev->conn = kzalloc(sizeof(*wdev->conn), GFP_KERNEL);

0 commit comments

Comments
 (0)