Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755556AbcC3QXd (ORCPT ); Wed, 30 Mar 2016 12:23:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59464 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755417AbcC3QXE (ORCPT ); Wed, 30 Mar 2016 12:23:04 -0400 Subject: Re: [RESEND PATCH v2 1/2] Revert "scsi: fix soft lockup in scsi_remove_target() on module removal" From: "Ewan D. Milne" Reply-To: emilne@redhat.com To: Johannes Thumshirn Cc: "Martin K. Petersen" , "James E.J. Bottomley" , Hannes Reinecke , Christoph Hellwig , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org In-Reply-To: <1d6331c085cbf189b2ead0baf92646068768c81c.1459249252.git.jthumshirn@suse.de> References: <1d6331c085cbf189b2ead0baf92646068768c81c.1459249252.git.jthumshirn@suse.de> Content-Type: text/plain; charset="UTF-8" Organization: Red Hat Date: Wed, 30 Mar 2016 12:23:02 -0400 Message-ID: <1459354982.30035.22.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 30 Mar 2016 16:23:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1353 Lines: 37 On Wed, 2016-03-30 at 09:09 +0200, Johannes Thumshirn wrote: > This reverts commit 90a88d6ef88edcfc4f644dddc7eef4ea41bccf8b. > > Signed-off-by: Johannes Thumshirn > Cc: stable@vger.kernel.org > --- > drivers/scsi/scsi_sysfs.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c > index 00bc721..4f18a85 100644 > --- a/drivers/scsi/scsi_sysfs.c > +++ b/drivers/scsi/scsi_sysfs.c > @@ -1272,18 +1272,16 @@ static void __scsi_remove_target(struct scsi_target *starget) > void scsi_remove_target(struct device *dev) > { > struct Scsi_Host *shost = dev_to_shost(dev->parent); > - struct scsi_target *starget, *last_target = NULL; > + struct scsi_target *starget; > unsigned long flags; > > restart: > spin_lock_irqsave(shost->host_lock, flags); > list_for_each_entry(starget, &shost->__targets, siblings) { > - if (starget->state == STARGET_DEL || > - starget == last_target) > + if (starget->state == STARGET_DEL) > continue; > if (starget->dev.parent == dev || &starget->dev == dev) { > kref_get(&starget->reap_ref); > - last_target = starget; > spin_unlock_irqrestore(shost->host_lock, flags); > __scsi_remove_target(starget); > scsi_target_reap(starget); Reviewed-by: Ewan D. Milne