Search Linux Wireless

Re: [bug report] mac80211: accept key reinstall without changing anything

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

 



On Fri, 2023-09-15 at 19:47 +0300, Dan Carpenter wrote:
> On Fri, Sep 15, 2023 at 06:37:45PM +0200, Johannes Berg wrote:
> > On Fri, 2023-09-15 at 11:29 +0300, Dan Carpenter wrote:
> > > Hello Johannes Berg,
> > > 
> > > The patch fdf7cb4185b6: "mac80211: accept key reinstall without
> > > changing anything" from Sep 5, 2017 (linux-next),
> > 
> > Huh that's kind of old :-)
> > 
> 
> Someone shuffled the return paths in ieee80211_key_link() 
> 

I did :P

> so it became easier to parse.

Somewhat:

@@ -906,8 +905,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
         */
        if (ieee80211_key_identical(sdata, old_key, key)) {
                ieee80211_key_free_unused(key);
-               ret = 0;
-               goto out;
+               return 0;
        }
 
        key->local = sdata->local;
@@ -931,9 +929,6 @@ int ieee80211_key_link(struct ieee80211_key *key,
                ieee80211_key_free(key, delay_tailroom);
        }
 
- out:
-       mutex_unlock(&sdata->local->key_mtx);
-
        return ret;
 }


I guess to a person that doesn't seem all that different, but who knows
how the tools interpret all the control flow here.

Hey, at least something already came out of all the locking reductions
:-)


>   I normally don't report old bugs because normally it's
> abandoned and forgotten by that time.  But I know you're still around
> fixing bugs and no good deed should go unpunished.  ;)

:-)

Anyway, not going to fix it today, but I've noted it.

johannes




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

  Powered by Linux