Search Linux Wireless

Re: [PATCH 4/4] rfkill: mutex fixes

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

 



On Thu, 17 Jul 2008, drago01 wrote:
> On Thu, Jul 17, 2008 at 6:56 AM, Michael Buesch <mb@xxxxxxxxx> wrote:
> > On Tuesday 15 July 2008, Henrique de Moraes Holschuh wrote:
> >> There are two mutexes in rfkill:
> >>
> >> rfkill->mutex, which protects some of the fields of a rfkill struct, and is
> >> also used for callback serialization.
> >>
> >> rfkill_mutex, which protects the global state, the list of registered
> >> rfkill structs and rfkill->claim.
> >>
> >> Make sure to use the correct mutex, and to not miss locking rfkill->mutex
> >> even when we already took rfkill_mutex.
> 
> rfkill_state_mutex ?

rfkill_mutex protects a lot of stuff, and does general serialization inside
rfkill.c.  rfkill_global_mutex is a good name for it, yes.

rfkill->mutex protects more than the state, better leave that one alone.  If
I find a way to do it without LONG periods under spinlock_irqsave, I'd make
it a spinlock to let drivers call some stuff in interrupt/atomic context...

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux