Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2296457imc; Tue, 12 Mar 2019 10:49:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy71Sk1LTNpXzPc614safn/jwxCi4/5/TXcoTNoers7DUgpKMkhQWF8AkP6GgraNWGA9K28 X-Received: by 2002:a62:e204:: with SMTP id a4mr39302145pfi.225.1552412989397; Tue, 12 Mar 2019 10:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552412989; cv=none; d=google.com; s=arc-20160816; b=dH9Lh66RCAbHWiVEQqCFOLaCvJyEyWDw48/JDaHyRJaRsAffPAxoIFmbL4ifpVVqk1 5ZnrknSZARbhT7xZcbS5NsQZgcReVqbnoRBF6JwtVFgyOf1Mv32aR5G/hF9K3WQ96khR bUCdboGNMteNH4ifgORjhugKypr1QNbJtZocKqOzlul3zPQERw0nhcdbW5EtMYr6YhNc YJVZPpLdDYAiq/UjfCr/ncZ3w9FhH2ZJEaQDulxRAui9aeYB46i0SWW9j5V/7LEz02Rk v1x975hzZmRTfv6ikgoDHZKwx4OV8sV1kXsQYJxmtiqUZlhWlhl3mhJhN6NduBe1RcGK K2Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2Aqi134qIPH7JB/NRT7h8jOjBAJZT/yS00fHSceHytI=; b=cQHlgwsiUOhxcZHkr+2aebrFrlmM8nxaH/PVJhUDibzpoONmHa2S6SvnePN+Auxi3V gMicVHe+NgY6gAoeOnB2bXXamtg2HilEqTK6/qFYHKDq72IwqIlI5Oyk31VFUAR0FYnf fikw8Niht1KS6r4oKgnerU6nIiafHjOr6oOw6nYIx4kxQl8x2gL9YK9aSqsUs0g/ode1 Lu5SeoXdfc6YKf+lmtheXq10KyM7SWyfjrwnJPIhM+mfFVqiWUrh86/Lgu2g3VP1Iv/e pvj3B6k+LL/+mUhzsom3CkRtsmUa7zk+4WFXEFC9eeQJaQsmEVFYVrWxfFb+W9dMRJZj C2YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pxXlh2dC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si7662410pgp.34.2019.03.12.10.49.33; Tue, 12 Mar 2019 10:49:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pxXlh2dC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728953AbfCLRsf (ORCPT + 99 others); Tue, 12 Mar 2019 13:48:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:54582 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728579AbfCLRPA (ORCPT ); Tue, 12 Mar 2019 13:15:00 -0400 Received: from localhost (unknown [104.133.8.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B85CA21741; Tue, 12 Mar 2019 17:14:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552410899; bh=FMH7wI9VRhclJGSs2kOZjIXfi553yztuqNvKuCDYOP0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pxXlh2dCyDNWGJDb48W+bSgSY7HmTl7JcdgR7YxdbFfFVBg5WmhHOkUxIijVgCj3V bnhcq3sdFG/W1Rx/ttVhBL30L27YRIqeCm7JopgSCf+nyOCidN+u1ypC+6MQY4RCoZ 0us+cpVDIgXwIfj40zrNQSD4ScJVzolmoX3SCf44= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ross Lagerwall , Hannes Reinecke , "Martin K. Petersen" , Sasha Levin Subject: [PATCH 4.19 112/149] Revert "scsi: libfc: Add WARN_ON() when deleting rports" Date: Tue, 12 Mar 2019 10:08:50 -0700 Message-Id: <20190312170358.868418630@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190312170349.421581206@linuxfoundation.org> References: <20190312170349.421581206@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit d8f6382a7d026989029e2e50c515df954488459b ] This reverts commit bbc0f8bd88abefb0f27998f40a073634a3a2db89. It added a warning whose intent was to check whether the rport was still linked into the peer list. It doesn't work as intended and gives false positive warnings for two reasons: 1) If the rport is never linked into the peer list it will not be considered empty since the list_head is never initialized. 2) If the rport is deleted from the peer list using list_del_rcu(), then the list_head is in an undefined state and it is not considered empty. Signed-off-by: Ross Lagerwall Reviewed-by: Hannes Reinecke Signed-off-by: Martin K. Petersen Signed-off-by: Sasha Levin --- drivers/scsi/libfc/fc_rport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index 372387a450df..1797e47fab38 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -184,7 +184,6 @@ void fc_rport_destroy(struct kref *kref) struct fc_rport_priv *rdata; rdata = container_of(kref, struct fc_rport_priv, kref); - WARN_ON(!list_empty(&rdata->peers)); kfree_rcu(rdata, rcu); } EXPORT_SYMBOL(fc_rport_destroy); -- 2.19.1