Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757182AbYJGAmp (ORCPT ); Mon, 6 Oct 2008 20:42:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756168AbYJGAlV (ORCPT ); Mon, 6 Oct 2008 20:41:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:60135 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754023AbYJGAlT (ORCPT ); Mon, 6 Oct 2008 20:41:19 -0400 Date: Mon, 6 Oct 2008 17:37:38 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org, jejb@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Yuri Tikhonov , Ilya Yanok , Dan Williams Subject: [patch 06/71] async_tx: fix the bug in async_tx_run_dependencies Message-ID: <20081007003738.GG3055@suse.de> References: <20081007002606.723632097@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="async_tx-fix-the-bug-in-async_tx_run_dependencies.patch" In-Reply-To: <20081007003634.GA3055@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1440 Lines: 43 2.6.26-stable review patch. If anyone has any objections, please let us know. ------------------ From: Yuri Tikhonov commit de24125dd0a452bfd4502fc448e3534c5d2e87aa upstream Should clear the next pointer of the TX if we are sure that the next TX (say NXT) will be submitted to the channel too. Overwise, we break the chain of descriptors, because we lose the information about the next descriptor to run. So next time, when invoke async_tx_run_dependencies() with TX, it's TX->next will be NULL, and NXT will be never submitted. Signed-off-by: Yuri Tikhonov Signed-off-by: Ilya Yanok Signed-off-by: Dan Williams Signed-off-by: Greg Kroah-Hartman --- crypto/async_tx/async_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c @@ -136,7 +136,8 @@ async_tx_run_dependencies(struct dma_asy spin_lock_bh(&next->lock); next->parent = NULL; _next = next->next; - next->next = NULL; + if (_next && _next->chan == chan) + next->next = NULL; spin_unlock_bh(&next->lock); next->tx_submit(next); -- -- 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/