Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp927079ioo; Thu, 26 May 2022 19:23:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw0iuSjXQW9lJw/WgNV2mdXpcbbvOth9Cb9q4P/WTiIQbRI7RFcE4DVTP/BQSubwmfiTwU X-Received: by 2002:a05:6402:5415:b0:42b:228:5cf with SMTP id ev21-20020a056402541500b0042b022805cfmr39619343edb.245.1653618213228; Thu, 26 May 2022 19:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653618213; cv=none; d=google.com; s=arc-20160816; b=i94tvCD0W+CtHL939Idb+d1PBSqexiVDFaXgPOk2QKjs2IMLbs3OTEmvdhFgKwfr/d mGNDpN6459NPXKTo9rUoErBNU9KhqNtJ4L7AVA5eVwJCeDx7S2bZDmxnHFyvZ6CoAG70 LPDKwmtZuNuBbSJnq6qi+18A/axislYIfTQL6Gi3EwSyPB+Em3xjyf8f4i5YVDv7mj0U 8rcrjhuaH+DVXHSpZPJXeDfH0LNBk6KJcuqMIiR6thipvjrA5/AQeXAb0fn+eDOSaGQi pu0bKQJ6YVAWCn19HU7JTM8FU1yyqs5lXNVnMBRq7ckIHloMpjbFu9JHnwOyyJ9BZv6O ENvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=m9eS1TxSHRFd/u36PSumGJaKjxQmnHrPcXPPPIMXmEY=; b=pIzrNRr6wllB5qPLN8LkpIXs682TU4giwko5uDdLY7OcYLoTpknkX/o/o5S/64Mc48 AEXkbdottkROVFloR1biePYxvvaH7Yoo/re9YrucnU7WIHuQoo8ZNVppNJ8Uw3Ch3O80 E0wSexBcXoOnn6BvjGN7h/6lBQRB+0mpuG3Q591akabEFgDpftpfn9aSfAy9V6zDoFs9 jv44kC5yfWQoG866djTll7Z9Mf1OWxVaMkWD5ZuvoQGb12R9q2xkyXgXL1VAHT5vsdTv Xf+IkYUoEf0c8cTM5kyNDcVEgAYVO3ZwEupfUtK7GioTA//v80EW6Pm2OS2jsF8MIQKn kwtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=LLsQ2rxb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hw8-20020a170907a0c800b006f8947581b5si3350272ejc.656.2022.05.26.19.23.05; Thu, 26 May 2022 19:23:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=LLsQ2rxb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346794AbiEZI6F (ORCPT + 99 others); Thu, 26 May 2022 04:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346797AbiEZI6D (ORCPT ); Thu, 26 May 2022 04:58:03 -0400 Received: from mail-m974.mail.163.com (mail-m974.mail.163.com [123.126.97.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 54FB1C5DA3; Thu, 26 May 2022 01:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=m9eS1 TxSHRFd/u36PSumGJaKjxQmnHrPcXPPPIMXmEY=; b=LLsQ2rxbS9QTNaaEI7mhw /X+3pCYNIIZuQ+dvwDqHcNhJn5awVvArwcF0zFQDOTitz4GQDoSc6NwyliMUm/vX jFy0RZN2qwcj8MioFvGfaewqU6zYK3ROLFaFGEwjONtXrPTlyaDnJR6bvf1lxzfI ur8s+Lfat000VTOxzlJaOU= Received: from localhost.localdomain (unknown [123.112.69.106]) by smtp4 (Coremail) with SMTP id HNxpCgDnHeP4QI9igxV5EQ--.19625S4; Thu, 26 May 2022 16:57:31 +0800 (CST) From: Jianglei Nie To: ketan.mukadam@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jianglei Nie Subject: [PATCH] scsi: be2iscsi: fix potential memory leak in beiscsi_process_mcc_compl() Date: Thu, 26 May 2022 16:57:21 +0800 Message-Id: <20220526085721.481202-1-niejianglei2021@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: HNxpCgDnHeP4QI9igxV5EQ--.19625S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7GrykCrW8CFWfJF17Jw43Jrb_yoW3Wwb_ur 43tr17K39xGFsayr1Fgan8AFZI9FW8Xwn7urWaq34SvFWUurnxXFyDtrn7W3y8Aw4xXFn8 Jw4Dur1Yyws3XjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRidWrtUUUUU== X-Originating-IP: [123.112.69.106] X-CM-SenderInfo: xqlhyxxdqjzvrlsqjii6rwjhhfrp/1tbiPhsNjFxBsWACbgAAsE X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should call free_mcc_wrb() before the function returns.This patch adds the missing free_mcc_wrb() before the funciton returns. Signed-off-by: Jianglei Nie --- drivers/scsi/be2iscsi/be_cmds.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c index 69b1a80e3687..d07107a0bf41 100644 --- a/drivers/scsi/be2iscsi/be_cmds.c +++ b/drivers/scsi/be2iscsi/be_cmds.c @@ -498,6 +498,7 @@ int beiscsi_process_mcc_compl(struct be_ctrl_info *ctrl, beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_MBOX | BEISCSI_LOG_INIT | BEISCSI_LOG_CONFIG, "BC_%d : MBX cmd completed but not posted\n"); + free_mcc_wrb(ctrl, tag); return 0; } -- 2.25.1