Message ID | 1487925116-18650-1-git-send-email-manish.rangankar@cavium.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 96A686020A for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 24 Feb 2017 08:50:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8679F28581 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 24 Feb 2017 08:50:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 796B7285FD; Fri, 24 Feb 2017 08:50:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3C4928581 for <patchwork-linux-scsi@patchwork.kernel.org>; Fri, 24 Feb 2017 08:50:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751836AbdBXItl (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Fri, 24 Feb 2017 03:49:41 -0500 Received: from mail-bn3nam01on0050.outbound.protection.outlook.com ([104.47.33.50]:10373 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752029AbdBXItK (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Fri, 24 Feb 2017 03:49:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=eLv7uP8PBak2HIUu6dv7Ikunj/iKwDYdueL1wAWQ/bI=; b=o4gpGZ6IKiuFipGCD2D+MQ4JquINBTvEzcRnFuWqFEpNpOXXyK7cogUdIMolCu5NEkyo7qZckbyWcMkuI1IB/7dPTl0nOvviWQyIh1CP6VWIVFwbQJWftiJOZY+lHK5Tl2f52LoG+Ur03IHGF2eyp1WgZOxfjUkp6/mfTH+r5Tw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Manish.Rangankar@cavium.com; Received: from cavium.com (173.186.134.106) by CO2PR07MB2485.namprd07.prod.outlook.com (10.166.200.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.13; Fri, 24 Feb 2017 08:32:08 +0000 From: Manish Rangankar <manish.rangankar@cavium.com> To: martin.petersen@oracle.com, lduncan@suse.com, cleech@redhat.com Cc: linux-scsi@vger.kernel.org, QLogic-Storage-Upstream@cavium.com Subject: [PATCH] qedi: Fix memory leak in tmf response processing. Date: Fri, 24 Feb 2017 00:31:56 -0800 Message-Id: <1487925116-18650-1-git-send-email-manish.rangankar@cavium.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [173.186.134.106] X-ClientProxiedBy: CY1PR03CA0028.namprd03.prod.outlook.com (10.174.128.38) To CO2PR07MB2485.namprd07.prod.outlook.com (10.166.200.143) X-MS-Office365-Filtering-Correlation-Id: b2403921-8ae9-4dc2-35c9-08d45c8f9f81 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CO2PR07MB2485; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2485; 3:wYw+e/SJSBi4S/vr5jS5SGTFPEVj0jOAUePb/7LrzZxusag0rYV1VNDXUpHzO+SGQJRJqUNI3wf3NU+ExRGQn9Q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Z6dHpAuSedbTlzxtWanvxoQ2rpDTs0T+SXx7AcZ7twGGI9aui/DqMgBrq01xWeOjxMWTfKaM1YE0jYPKtNdZdTX15tktknzHb7gd9xJdkojvXq0tKnDLqlx3iq8mYpxhxl/Q1DVi4Wu0KTSWirCvr24+J5Jya3D5Bl3ALhdNTPSVart3+ap7flyduLi2u8WIj+NRymsl/SSIGW6S0/x2Q6d8mVsVAH2sg/6wbZcmuOYFO8hrC3/ZgoFaLEeleWReB+1HigyV3GoTNL+olgJhLAbUHhLNV3z5F0Fb665reJ3b2Y1REr2zQsCq3CDDmVOrHj6aLsz37u07zrBuLTS2GzZchd7L4K2XETMLQGSxz5HnM+HM8jkAkAezng6 X-Microsoft-Antispam-PRVS: <CO2PR07MB2485067B55EB5C4E9EB7257BE3520@CO2PR07MB2485.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(20161123558025)(6072148); SRVR:CO2PR07MB2485; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2485; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2485; 4:v3CgyfjwdYjuNbDNcJsPgC4++o74kDwQ+Cp3dVo0rj+DSPVmyalqEiTOmoeIBuX/NZF86zDrC4fowd2rPNi0FzncQ+LWhIFSA85EUdXryArpLwMETl6TSTWG4ejHwBbVf8f5pYJST2WxoHcEHDHSqJ2jvHRrEbs9yfxeA1JNv9PMBYRJvdqnWqgxXlLic8qHwMC0quX7W92wNdmGcFCN0Q+8blmBwjSPHwIkyTjlqAbxLTzsp9jYY+K3ptRKcg6o/tY5T7874+0ZLSgbpjI7PfL/Imgf3hd1l2GXj+ZDZkITCYr6bvSDhdLP6xFJHUeFjuaKg/DJJ4apr8qo2fnQqOpwFQ6QeVoBEeUQ0myI3LQ6R+Q1qVMKOnjTuCxAagd+F3C/TtelBxvf+sjCHcWrHzOKn2EOrHnJwRf3ff8HDmuoIBmAhlgSpfk9siBNZT4thGfjMDYtjTzj6cNc/i8oJr1gj3y3IQRvupIk6/Zww+sJVPV3Nirezh76XkYIeF7IKqCB8pX/YLv/CClE4cIyq4YdNlT2LYf9kofjSfts+rXi2AzYWfy1uW/vQoan8k4GqQDdCrBQwwhqVAV//zidroV6FxTBsfzBGA0eNFiqHss= X-Forefront-PRVS: 0228DDDDD7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(5660300001)(81156014)(4720700003)(50226002)(47776003)(21086003)(92566002)(97736004)(33646002)(2906002)(68736007)(69596002)(6666003)(8676002)(575784001)(5003940100001)(81166006)(86362001)(101416001)(7736002)(50986999)(106356001)(42186005)(36756003)(105586002)(3846002)(305945005)(6116002)(55016002)(53936002)(110136004)(189998001)(38730400002)(66066001)(107886003)(25786008)(50466002)(48376002); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2485; H:cavium.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2485; 23:Q4rS7r4TJL/0v1O+Q/x5UnVz4SEhZ/PxSOB4+5CBd?= =?us-ascii?Q?NctCNAtpkuRygSfplEULfARbtsQBwzT5XJLsXT5YbJliM7w6WiafwOvHc8TH?= =?us-ascii?Q?0MuuOSSUm+/lZoXnPrksAhAQtSuUlmOfpUxcWITY9GFzVpcp2QIdo5QxBeEX?= =?us-ascii?Q?fHBjOCUdzWbfndy9GhUnQ70ZBPp5QEH+pkjO2CLcplHTWxynGEtSbtplXoj0?= =?us-ascii?Q?CQeH/8tLac/3k13QgdGUARmEY4fFUkrjZrdiH0iCQwsJtINlrREITLGCoJA4?= =?us-ascii?Q?7t84pBw9z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k7RO6plwZl38g== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Feb 2017 08:32:08.8543 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2485 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
>>>>> "Manish" == Manish Rangankar <manish.rangankar@cavium.com> writes:
Manish,
Applied to 4.11/scsi-fixes.
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index b1d3904..c9f0ef4 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -165,10 +165,9 @@ static void qedi_tmf_resp_work(struct work_struct *work) iscsi_block_session(session->cls_session); rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true); if (rval) { - clear_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); qedi_clear_task_idx(qedi, qedi_cmd->task_id); iscsi_unblock_session(session->cls_session); - return; + goto exit_tmf_resp; } iscsi_unblock_session(session->cls_session); @@ -177,6 +176,8 @@ static void qedi_tmf_resp_work(struct work_struct *work) spin_lock(&session->back_lock); __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0); spin_unlock(&session->back_lock); + +exit_tmf_resp: kfree(resp_hdr_ptr); clear_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); }