Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp959880pxb; Thu, 19 Nov 2020 19:19:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwwaWnO+7HTqri7sQ5nycN/ayiVL9rjT0drTU4EP1tGRE/Z/HTFaKTm35UPaIuIHIeZbg8r X-Received: by 2002:a17:906:c41:: with SMTP id t1mr31190628ejf.19.1605842393532; Thu, 19 Nov 2020 19:19:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605842393; cv=none; d=google.com; s=arc-20160816; b=AOgdTHO7HHIqbE/i+r+mR0nkJDgnAyCVvq+YDEDjZPlt0WP7VFA5Dcl+ujwhJwxzy9 hmp5RAmBjbya2mN63KZ/QYK4A+RgicnIMa3n8dltU21rGEwmpXR8t4PxHorrFapkajQ6 kslRRn9JjFDnhjoBlC4I0UvJl96x0OMSPB3yheiNohW0P0eLQPe18d2PBQLTUi0Bt8lc eBT8csryxG7pMTkWagXU5kG15A7eS3pkggSv7uW1KRpHAhoESwk7wSM0UcQJGqEiZD2t zW8UtViLQye65PfX4B1fp9QCFJFNF88bLts2U/cqE5xyL3dsPPIIiFF4L7VEW1w4rmmJ 5JMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:date:references :message-id:organization:from:subject:cc:to:dkim-signature; bh=/AZaGsozau1Ylap7Gb4tYCOsCEIKJGqpAULHIQ4wllw=; b=jCBtac9HMj+13uFb3sK+8kbVV+MFg2GgQ0YMXgR2BDnOQnyc7wNgN/vYfw0OtaC0Fb gjNj/BS9SOOnqFJkfKhbAA4+svr1S6EwR/VrD/ccTAS/PS7Ls3g3locq5R8nCW0dFaQz cMsjzdLK0W2Mm0LWphQ/lPZbN3ahB7pKrLBp0cjbrbsA6eab/SLda1rpDAGx+NFPTU0n Bcw4hm4xqU87mp6Pd2QU4zTHspHntBaHt6vbESv1EWw2rkueZawBkXl2AqcymcZKiwrt xXU/hVTmd3UGKEy/n0Dyo4F0V9XBejWvzEussQtyz7IZQVffDUSmz+UsxbAVlrqJkKpD KAYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ZWTUlf92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w21si977473edx.274.2020.11.19.19.19.30; Thu, 19 Nov 2020 19:19:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=ZWTUlf92; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727338AbgKTDRh (ORCPT + 99 others); Thu, 19 Nov 2020 22:17:37 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:37664 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbgKTDRg (ORCPT ); Thu, 19 Nov 2020 22:17:36 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AK3ASSD044953; Fri, 20 Nov 2020 03:17:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=to : cc : subject : from : message-id : references : date : in-reply-to : mime-version : content-type; s=corp-2020-01-29; bh=/AZaGsozau1Ylap7Gb4tYCOsCEIKJGqpAULHIQ4wllw=; b=ZWTUlf924IImxXkmc5OYBWA6SsxtkokZs4bbW3Jpul4VZBuEnegzsaUkF9IcbXQX2nzG d9fLut2btuf4Eu9h2u11PhTjACSdgyksBEtkWvpMpR0lBJWP8vXKY+gqNxqB9CqP/oYt SbWtAxH5bpt/COi6wakSHmSfh8Aan6ieJcjjEN1qCi1ANVmMLNQ41rCpECtXJDYpb26+ sAswCq83pjc7AbqUiqJKIYO48JH8e49wBgij+gjmAYZ2K67h46hsK65XqIkl80Wq0xeV P3Wd7Zr2za5kp0ZmTPrO46+waIZkYzex7G1waYjanB6aLUrmSnEqfwSK8fMD10GyK281 Kw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 34t4rb8t65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Nov 2020 03:17:31 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AK36eTQ160822; Fri, 20 Nov 2020 03:17:31 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 34ts60w1ah-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Nov 2020 03:17:31 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AK3HUUr010591; Fri, 20 Nov 2020 03:17:30 GMT Received: from ca-mkp.ca.oracle.com (/10.159.214.123) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 19 Nov 2020 19:17:29 -0800 To: Colin King Cc: James Smart , Dick Kennedy , "James E . J . Bottomley" , "Martin K . Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] scsi: lpfc: Fix memory leak on lcb_context From: "Martin K. Petersen" Organization: Oracle Corporation Message-ID: References: <20201118141314.462471-1-colin.king@canonical.com> Date: Thu, 19 Nov 2020 22:17:27 -0500 In-Reply-To: <20201118141314.462471-1-colin.king@canonical.com> (Colin King's message of "Wed, 18 Nov 2020 14:13:14 +0000") MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9810 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=5 mlxscore=0 malwarescore=0 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011200022 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9810 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 clxscore=1015 malwarescore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 adultscore=0 phishscore=0 suspectscore=5 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011200022 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Colin, > Currently there is an error return path that neglects to free the > allocation for lcb_context. Fix this by adding a new error free exit > path that kfree's lcb_context before returning. Use this new kfree > exit path in another exit error path that also kfree's the same > object, allowing a line of code to be removed. Applied to 5.11/scsi-staging, thanks! -- Martin K. Petersen Oracle Linux Engineering