mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Deadlock between tasklist_lock and dcache_lock
@ 2003-03-23 17:28 Manfred Spraul
  2003-03-24 13:41 ` Maneesh Soni
  0 siblings, 1 reply; 2+ messages in thread
From: Manfred Spraul @ 2003-03-23 17:28 UTC (permalink / raw)
  To: linux-kernel

__unhash_process acquires the dcache_lock while holding the tasklist_lock 
for writing. AFAICS this can deadlock:

CPU1:
	[ in release_task() ]
	write_lock_irq(&tasklist_lock);
	__unhash_process()
	
CPU2:
	spin_lock(&dcache_lock);
	<interrupt>
	read_lock(&tasklist_lock);, // e.g. for signal delivery
	** spins, lock held by cpu 1 for writing.

CPU1:
	[ within __unhash_process() ]
	spin_lock(&dcache_lock);
	** spins, lock held by CPU2

Probably the callers of __unhash_process must acquire the dcache_lock 
before write_lock_irq(&tasklist_lock).

Any other ideas how to fix the deadlock?
--
	Manfred


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-24 13:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-23 17:28 Deadlock between tasklist_lock and dcache_lock Manfred Spraul
2003-03-24 13:41 ` Maneesh Soni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®