Return-Path: Received: from mail.linux-iscsi.org ([67.23.28.174]:50841 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750717AbdCBFWa (ORCPT ); Thu, 2 Mar 2017 00:22:30 -0500 Message-ID: <1488432095.21712.8.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH v6 14/33] target: Avoid that target drivers hang if a command is aborted From: "Nicholas A. Bellinger" To: Bart Van Assche Cc: "target-devel@vger.kernel.org" , "stable@vger.kernel.org" Date: Wed, 01 Mar 2017 21:21:35 -0800 In-Reply-To: <1D08B61A9CF0974AA09887BE32D889DA0AC669@ULS-OP-MBXIP03.sdcorp.global.sandisk.com> References: <20170215002612.14566-1-bart.vanassche@sandisk.com> <20170215002612.14566-15-bart.vanassche@sandisk.com> <1487626736.19491.37.camel@haakon3.risingtidesystems.com> <1D08B61A9CF0974AA09887BE32D889DA0AC669@ULS-OP-MBXIP03.sdcorp.global.sandisk.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Tue, 2017-02-21 at 18:58 +0000, Bart Van Assche wrote: > On 02/20/2017 01:38 PM, Nicholas A. Bellinger wrote: > > However, looking at transport_generic_free_cmd() in the context of > > ib_srpt and ib_isert, I don't see how this scenario can ever happen in > > as-is in upstream code. > > > > Namely, all of the transport_generic_free_cmd() callers in ib_srpt and > > ib_isert pass wait_for_tasks = false. And the only time > > transport_generic_free_cmd() will block is when wait_for_tasks = true, > > or when wait_for_tasks = true && abort = true. > > > > So as-is in upstream, how can transport_generic_free_cmd() ever block > > when wait_for_tasks = false..? > > I will check the other patches in this series for changes that trigger a > call to wait_for_completion() if wait_for_tasks == false. > Given there has not been any follow-up to identify a case in upstream where ib_isert or ib_srpt is using target_generic_free_cmd() with wait_for_tasks = true or a case where wait_for_tasks = false blocks, I'll conclude this was a bugfix incorrectly CC'ed to stable for breakage introduced by other changes in this series. To reiterate the importance of having bug-fixes, especially those intended for stable, always be leading other patches.. There is no way for a maintainer to know which bug-fixes are to existing code unless they precede all other patches and not intermixed with various other changes. The bug-fixes to existing upstream code need to be tested on their own without the other changes (especially those that effect the same area) invalidating the tests.