Re: [RFC 4/4] firewire: add mem1394

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

 



Johannes Berg wrote:
On Fri, 2006-02-03 at 12:35 +0100, Andy Wingo wrote:
On Thu, 2006-02-02 at 23:43 +0100, Johannes Berg wrote:

+	spin_lock(&dev_list_lock);

Stupid question: are you sure that something coming from an interrupt
handler won't try to grab this lock? For example from a cable unplug?

Yes, I'm pretty sure (but I hope some of the firewire experts will chime
in) -- but if you unplug or anything the node only goes into 'limbo' and
afaict if it is ever cleaned up then that comes from a thread context.

The lock will only be taken in non-atomic context. In particular, if a mem1394 device is to be removed after cable unplug, the code will be run by knodemgrd.

What is more recommendable for mutual exclusion in non-atomic context (here also with very low probality of lock contention, given the current implementation of ieee1394) --- a mutex or a spinlock?
--
Stefan Richter
-=====-=-==- --=- --=-=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux