* [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved()
@ 2020-08-04 21:05 Rustam Kovhaev
2020-08-19 8:46 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Rustam Kovhaev @ 2020-08-04 21:05 UTC (permalink / raw)
To: johannes, davem, kuba
Cc: linux-wireless, netdev, linux-kernel, Rustam Kovhaev
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved()
2020-08-04 21:05 [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved() Rustam Kovhaev
@ 2020-08-19 8:46 ` Johannes Berg
2020-08-19 15:23 ` Rustam Kovhaev
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2020-08-19 8:46 UTC (permalink / raw)
To: Rustam Kovhaev, davem, kuba; +Cc: linux-wireless, netdev, linux-kernel
On Tue, 2020-08-04 at 14:05 -0700, Rustam Kovhaev wrote:
> this warning can be triggered by userspace, so it should not cause a
> panic if panic_on_warn is set
This is incorrect, it just addresses a particular symptom. I'll make a
proper fix.
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved()
2020-08-19 8:46 ` Johannes Berg
@ 2020-08-19 15:23 ` Rustam Kovhaev
0 siblings, 0 replies; 3+ messages in thread
From: Rustam Kovhaev @ 2020-08-19 15:23 UTC (permalink / raw)
To: Johannes Berg; +Cc: davem, kuba, linux-wireless, netdev, linux-kernel
On Wed, Aug 19, 2020 at 10:46:34AM +0200, Johannes Berg wrote:
> On Tue, 2020-08-04 at 14:05 -0700, Rustam Kovhaev wrote:
> > this warning can be triggered by userspace, so it should not cause a
> > panic if panic_on_warn is set
>
> This is incorrect, it just addresses a particular symptom. I'll make a
> proper fix.
tyvm!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-19 15:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-04 21:05 [PATCH] cfg80211: switch from WARN() to pr_warn() in is_user_regdom_saved() Rustam Kovhaev
2020-08-19 8:46 ` Johannes Berg
2020-08-19 15:23 ` Rustam Kovhaev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).