lkml.org 
[lkml]   [2003]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectDeadlock between tasklist_lock and dcache_lock
__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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.022 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site