From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:37721 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752797AbdBJADa (ORCPT ); Thu, 9 Feb 2017 19:03:30 -0500 To: Steffen Maier Cc: "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, linux-s390@vger.kernel.org, Martin Schwidefsky , Heiko Carstens , "#2 . 6 . 38+" Subject: Re: [PATCH] zfcp: fix use-after-free by not tracing WKA port open/close on failed send From: "Martin K. Petersen" References: <20170208143422.64943-1-maier@linux.vnet.ibm.com> Date: Thu, 09 Feb 2017 19:02:48 -0500 In-Reply-To: <20170208143422.64943-1-maier@linux.vnet.ibm.com> (Steffen Maier's message of "Wed, 8 Feb 2017 15:34:22 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: stable-owner@vger.kernel.org List-ID: >>>>> "Steffen" == Steffen Maier writes: Steffen> Rather than relying on req being NULL (or ERR_PTR) for all Steffen> cases where we don't want to trace or should not trace, simply Steffen> check retval which is unconditionally initialized with -EIO != Steffen> 0 and it can only become 0 on successful retval = Steffen> zfcp_fsf_req_send(req). With that we can also remove the then Steffen> again unnecessary unconditional initialization of req which was Steffen> introduced with that earlier commit. Applied to 4.10/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering