Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 23 Mar 2003 12:17:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 23 Mar 2003 12:17:25 -0500 Received: from dbl.q-ag.de ([80.146.160.66]:61064 "EHLO dbl.q-ag.de") by vger.kernel.org with ESMTP id ; Sun, 23 Mar 2003 12:17:25 -0500 Date: Sun, 23 Mar 2003 18:28:22 +0100 (CET) From: Manfred Spraul X-X-Sender: manfred@dbl.q-ag.de To: linux-kernel@vger.kernel.org Subject: Deadlock between tasklist_lock and dcache_lock Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 847 Lines: 31 __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); 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/