Re: [PATCH] ath9k: Fix a locking bug in ath9k_add_interface()

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

 



On Wed, Oct 24, 2018 at 08:50:52AM +0300, Kalle Valo wrote:
> Dan Carpenter <dan.carpenter@xxxxxxxxxx> writes:
> 
> > We tried to revert commit d9c52fd17cb4 ("ath9k: fix tx99 with monitor
> > mode interface") but accidentally missed part of the locking change.
> >
> > The lock has to be held earlier so that we're holding it when we do
> > "sc->tx99_vif = vif;" and also there in the current code there is a
> > stray unlock before we have taken the lock.
> >
> > Fixes: 6df0580be8bc ("ath9k: add back support for using active monitor interfaces for tx99")
> > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> commit 6df0580be8bc is on it's way to v4.20 so should I also queue this
> to v4.20?

Yeah.  Obviously this is a static checker thing and I haven't tested it.

I don't know if add_interface() is ever called in parallel, but I can
imagine that it might be.  In that case the race condition is something
that would affect real life.

Anyway, it's a small obvious fix.

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux