Search Linux Wireless

Re: [PATCH 18/24] regulatory: fix reg_is_valid_request handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2012-12-13 at 13:27 -0800, Luis R. Rodriguez wrote:

> > diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> > index 260b5d8..370cd31 100644
> > --- a/net/wireless/nl80211.c
> > +++ b/net/wireless/nl80211.c
> > @@ -4333,6 +4326,8 @@ static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
> >                 }
> >         }
> >
> > +       mutex_lock(&cfg80211_mutex);
> > +
> >         r = set_regdom(rd);
> >         rd = NULL;
> 
> Unless you removed it from previous patches in the series the
> "bad_reg" goto label has an unlock but above you removed the top
> locking call so I think you just forgot to remove the unlock on the
> goto label.

Good catch. Wonder why smatch didn't complain? Fixed.


> > @@ -1471,6 +1475,7 @@ new_request:

        if (last_request != &core_request_world)
                kfree(last_request);

> >
> >         last_request = pending_request;
> >         last_request->intersect = intersect;
> > +       last_request->processed = false;
> 
> The clearing you are doing is on the last_request but it comes from
> the pending regulatory request which is always false given that the
> request is kzalloc'd, not sure if that was needed or how that helped.

Not necessarily, I added a bit more context above -- if it's
core_request_world the clearing is needed I believe.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux