From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: "Grzegorz Duszyński" <gfduszynski@gmail.com>,
linux-wireless@vger.kernel.org
Subject: Re: [RFC] cfg80211: let's wmm_rule be part of reg_rule structure
Date: Tue, 21 Aug 2018 11:24:15 +0200 [thread overview]
Message-ID: <1534843455.25523.8.camel@sipsolutions.net> (raw)
In-Reply-To: <20180821091858.GA9376@redhat.com>
On Tue, 2018-08-21 at 11:18 +0200, Stanislaw Gruszka wrote:
> On Tue, Aug 21, 2018 at 10:58:33AM +0200, Johannes Berg wrote:
> > On Tue, 2018-08-21 at 10:57 +0200, Grzegorz Duszyński wrote:
> > > I've just briefly tested it, looks like it's working!
> > > I have only remote access to my machine at the moment so it's difficult
> > > to say for sure if everything is in order.
> > > However stalls do not occur, nor there are any error/warnings anywhere.
> > >
> >
> > That probably just means you now have some invalid data somewhere,
> > rather than a crash... Not sure which is better - I guess you'd rather
> > have it not crash, and I'd rather figure out where the invalid data is
> > coming from :)
>
> I think corruption of ieee80211_wmm_rule could came from strange
> pointers aritmetic and fwdb_wmm_rule can be fine.
Yes, could also be the case. I had the same suspicion really and that's
why I remembered the sizeof() thing.
> Anyway perhaps
> something like this on top of RFC patch would be helpful.
>
> diff --git a/net/wireless/reg.c b/net/wireless/reg.c
> index eb78c34d2357..4f84a67a0959 100644
> --- a/net/wireless/reg.c
> +++ b/net/wireless/reg.c
> @@ -853,6 +853,11 @@ static void set_wmm_rule(struct ieee80211_reg_rule *rrule,
> struct ieee80211_wmm_rule *rule = &rrule->wmm_rule;
> unsigned int i;
>
> + if (!valid_wmm(wmm)) {
> + pr_err("Invalid WMM rule\n");
> + return;
> + }
Sure, but probably better with some actual identification, like which
rule it was, and what country code, etc.?
johannes
next prev parent reply other threads:[~2018-08-21 12:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-21 7:40 [RFC] cfg80211: let's wmm_rule be part of reg_rule structure Stanislaw Gruszka
2018-08-21 8:57 ` Grzegorz Duszyński
2018-08-21 8:58 ` Johannes Berg
2018-08-21 9:03 ` Grzegorz Duszyński
2018-08-21 9:18 ` Stanislaw Gruszka
2018-08-21 9:24 ` Johannes Berg [this message]
2018-08-21 9:23 ` Johannes Berg
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=1534843455.25523.8.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=gfduszynski@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.com \
/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.