From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752133AbZEXUU0 (ORCPT ); Sun, 24 May 2009 16:20:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751888AbZEXUUN (ORCPT ); Sun, 24 May 2009 16:20:13 -0400 Received: from casper.infradead.org ([85.118.1.10]:41384 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbZEXUUN (ORCPT ); Sun, 24 May 2009 16:20:13 -0400 Date: Sun, 24 May 2009 12:40:09 -0700 From: Arjan van de Ven To: James Bottomley Cc: linux-scsi , linux-kernel Subject: Re: [PATCH] async: make sure independent async domains can't accidentally entangle. Message-ID: <20090524124009.0be540c5@infradead.org> In-Reply-To: <1243191043.2889.20.camel@localhost.localdomain> References: <1243175371.2889.17.camel@localhost.localdomain> <1243191043.2889.20.camel@localhost.localdomain> Organization: Intel X-Mailer: Claws Mail 3.7.0 (GTK+ 2.14.7; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 24 May 2009 13:50:43 -0500 James Bottomley wrote: > On Sun, 2009-05-24 at 09:29 -0500, James Bottomley wrote: > > The problem occurs when async_synchronize_full_domain() is called > > when the async_pending list is not empty. This will cause > > lowest_running() to return the cookie of the first entry on the > > async_pending list, which might be nothing at all to do with the > > domain being asked for and thus cause the domain synchronization to > > wait for an unrelated domain. This can cause a deadlock if domain > > synchronization is used from one domain to wait for another. > > > > Fix by running over the async_pending list to see if any pending > > items actually belong to our domain (and return their cookies if > > they do). > > > > Signed-off-by: James Bottomley > > > > OK, so that version locked up under testing ... this version doesn't > --- I think the phrase "MUST be called with the lock held!" was > supposed to be some sort of clue ... there's not many comments there.. but the ones that exist do mean something ;-) I'll craft this patch into your original description and send it to Linus to see if he'll take it for .30, otherwise it'll go for .31 -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org