Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1193792ybn; Wed, 2 Oct 2019 12:14:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqykLqzI2sPAJ+ZpOPTT5i8yzR9QkskMMkdorcSXKPyPWVCpOiRMKe4jyxEE0EWxLhEO4AuR X-Received: by 2002:a17:906:4a11:: with SMTP id w17mr4350511eju.21.1570043658484; Wed, 02 Oct 2019 12:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570043658; cv=none; d=google.com; s=arc-20160816; b=cjOKI787XeiPeNXWpQc7OtId25bpobiLnaR9Fe/+AG9hgAaGedLT3Mh+tw4h+I5yZw 2x79oONtPn2Vat7FS4WssCTi1hgJW1+CIk/+MEuJbDAMEI8fQE0wtAeTYFsYdNrYR2C4 RaD2Q0mXOUDNI1VvHOdf1t/eWeyV9yCeXcU2D30y5KMNKTR+XZqjN6HJcBGdlSnCE8DQ 2/69YUxmQM/ums49MIiJiS8fSrg55PGiWbW4EHlBrWjG05AIRZzYdfnfHACdVVjGkZbt jE4QmKA5iVnvFufGIfFhwZFVeafQSjOJfAPizeRELf6+c9gdzQ4Pons1cr+imn006Wxg ufpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=R9V2VSGNV/Keiln8dI1ndBuK7hR+BzGjDmFXQChf2bk=; b=MkA6mlWCwK256FuLMV5C3c1kLshFsY7h8ibFfAsgIDdS1iPk1K0CFH/FDqmUQ5PEd9 +83GxtD21iOY/2uMeXsuIyMBuWm1Yow/lKrjwiTNNoB41TbTt+C27DtJiSGMnYaDtKPs ULbq/qpvkU/LUTtAITwn987DXZ63DWvs3SNiMx2R8KAap+cJrpuKYgRapDHGTmmrSER3 j4prOTxUZ68LiWILIqYnvIyZdWaeG8OrwXw5zoscBmKFkFzUc/mRwdo6oVO8kYTH+clh RXGS5ICcQprDWBrcyGQLNETlMz/MKMkAom0+nai6Fm5lurxOcP0zULLCqsEFIeh+Eo30 skIw== ARC-Authentication-Results: i=1; mx.google.com; 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 z16si5253edb.420.2019.10.02.12.13.54; Wed, 02 Oct 2019 12:14:18 -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; 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 S1729000AbfJBTMl (ORCPT + 99 others); Wed, 2 Oct 2019 15:12:41 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:35412 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729119AbfJBTIK (ORCPT ); Wed, 2 Oct 2019 15:08:10 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iFjyo-00036B-OO; Wed, 02 Oct 2019 20:08:06 +0100 Received: from ben by deadeye with local (Exim 4.92.1) (envelope-from ) id 1iFjyo-0003cp-1r; Wed, 02 Oct 2019 20:08:06 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Jens Remus" , "Martin K. Petersen" , "Benjamin Block" , "Steffen Maier" Date: Wed, 02 Oct 2019 20:06:51 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 37/87] scsi: zfcp: fix missing zfcp_port reference put on -EBUSY from port_remove In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.75-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Steffen Maier commit d27e5e07f9c49bf2a6a4ef254ce531c1b4fb5a38 upstream. With this early return due to zfcp_unit child(ren), we don't use the zfcp_port reference from the earlier zfcp_get_port_by_wwpn() anymore and need to put it. Signed-off-by: Steffen Maier Fixes: d99b601b6338 ("[SCSI] zfcp: restore refcount check on port_remove") Reviewed-by: Jens Remus Reviewed-by: Benjamin Block Signed-off-by: Martin K. Petersen Signed-off-by: Ben Hutchings --- drivers/s390/scsi/zfcp_sysfs.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/s390/scsi/zfcp_sysfs.c +++ b/drivers/s390/scsi/zfcp_sysfs.c @@ -261,6 +261,7 @@ static ssize_t zfcp_sysfs_port_remove_st if (atomic_read(&port->units) > 0) { retval = -EBUSY; mutex_unlock(&zfcp_sysfs_port_units_mutex); + put_device(&port->dev); /* undo zfcp_get_port_by_wwpn() */ goto out; } /* port is about to be removed, so no more unit_add */