Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353399
| From | Christoph Lameter <cl@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic |
| Date | 2016-03-08 21:50 +0100 |
| Message-ID | <rawJR-659-45@gated-at.bofh.it> (permalink) |
| References | <raqXM-25J-23@gated-at.bofh.it> <rarqO-2vx-23@gated-at.bofh.it> <ras3w-2Le-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 8 Mar 2016, Vineet Gupta wrote: > # set the bit > 80543b8e: ld_s r2,[r13,0] <--- (A) Finds PG_locked is set > 80543b90: or r3,r2,1 <--- (B) other core unlocks right here > 80543b94: st_s r3,[r13,0] <--- (C) sets PG_locked (overwrites unlock) Duh. Guess you need to take the spinlock also in the arch specific implementation of __bit_spin_unlock(). This is certainly not the only case in which we use the __ op to unlock. You need a true atomic op or you need to take the "spinlock" in all cases where you modify the bit. If you take the lock in __bit_spin_unlock then the race cannot happen. > Are you convinced now ! Yes, please fix your arch specific code.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-08 15:40 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Christoph Lameter <cl@linux.com> - 2016-03-08 16:10 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <vgupta@synopsys.com> - 2016-03-08 16:50 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Christoph Lameter <cl@linux.com> - 2016-03-08 21:50 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-09 07:50 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-09 11:20 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-09 11:40 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-09 12:20 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-09 12:10 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-09 12:50 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-09 13:00 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-09 13:30 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-14 09:10 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-09 14:30 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-09 16:00 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-03-10 07:00 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Peter Zijlstra <peterz@infradead.org> - 2016-03-10 10:20 +0100
Re: [PATCH] mm: slub: Ensure that slab_unlock() is atomic Vlastimil Babka <vbabka@suse.cz> - 2016-03-08 16:40 +0100
csiph-web