Thread (8 messages) flat view 8 messages, 5 authors, 2015-08-25

Re: [PATCH] usbnet: Fix two races between usbnet_stop() and the BH

From: Oliver Neukum <oneukum@suse.com>
Date: 2015-08-25 12:37:59
Also in: lkml

On Mon, 2015-08-24 at 14:21 -0400, Alan Stern wrote:
quoted
In theory, an architecture could implement atomic bit operations
using 
quoted
a spinlock to insure atomicity.  I don't know if any architectures
do 
quoted
this, but if they do then the scenario above could arise.
Now that I see this in writing, I realize it's not possible after
all.  
clear_bit() et al. will work with a single unsigned long, which
doesn't
leave any place for spinlocks or other mechanisms.  I was thinking of 
atomic_t.
Refuting yourself you are making the assumption that the lock has
to be inside the data structure. That is not true.

	Regards
		Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help