From: Rustam Kovhaev <rkovhaev@gmail.com>
To: johannes@sipsolutions.net, davem@davemloft.net, kuba@kernel.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Rustam Kovhaev <rkovhaev@gmail.com>
Subject: [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved()
Date: Tue, 4 Aug 2020 14:05:46 -0700 [thread overview]
Message-ID: <20200804210546.319249-1-rkovhaev@gmail.com> (raw)
this warning can be triggered by userspace, so it should not cause a
panic if panic_on_warn is set
Reported-and-tested-by: syzbot+d451401ffd00a60677ee@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=d451401ffd00a60677ee
Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
---
net/wireless/reg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 0d74a31ef0ab..86355938ae8f 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -415,10 +415,10 @@ static bool is_user_regdom_saved(void)
return false;
/* This would indicate a mistake on the design */
- if (WARN(!is_world_regdom(user_alpha2) && !is_an_alpha2(user_alpha2),
- "Unexpected user alpha2: %c%c\n",
- user_alpha2[0], user_alpha2[1]))
+ if (!is_world_regdom(user_alpha2) && !is_an_alpha2(user_alpha2)) {
+ pr_warn("Unexpected user_alpha2: %c%c\n", user_alpha2[0], user_alpha2[1]);
return false;
+ }
return true;
}
--
2.27.0
next reply other threads:[~2020-08-04 21:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 21:05 Rustam Kovhaev [this message]
2020-08-19 8:46 ` [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved() Johannes Berg
2020-08-19 15:23 ` Rustam Kovhaev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200804210546.319249-1-rkovhaev@gmail.com \
--to=rkovhaev@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.