aboutsummaryrefslogtreecommitdiff
path: root/arch/ia64
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-03-07 00:44:13 +0900
committerTejun Heo <tj@kernel.org>2009-03-07 14:46:35 +0900
commitccea34b5d0fbab081496d1860f31acee99fa8a6d (patch)
treee7066b5dde0e83a216768569e57cd71cc83fe912 /arch/ia64
parenta56dbddf06b653ef9c04ca3767f260fd31ccebab (diff)
percpu: finer grained locking to break deadlock and allow atomic free
Impact: fix deadlock and allow atomic free Percpu allocation always uses GFP_KERNEL and whole alloc/free paths were protected by single mutex. All percpu allocations have been from GFP_KERNEL-safe context and the original allocator had this assumption too. However, by protecting both alloc and free paths with the same mutex, the new allocator creates free -> alloc -> GFP_KERNEL dependency which the original allocator didn't have. This can lead to deadlock if free is called from FS or IO paths. Also, in general, allocators are expected to allow free to be called from atomic context. This patch implements finer grained locking to break the deadlock and allow atomic free. For details, please read the "Synchronization rules" comment. While at it, also add CONTEXT: to function comments to describe which context they expect to be called from and what they do to it. This problem was reported by Thomas Gleixner and Peter Zijlstra. http://thread.gmane.org/gmane.linux.kernel/802384 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Thomas Gleixner <tglx@linutronix.de> Reported-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'arch/ia64')
0 files changed, 0 insertions, 0 deletions