Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp113149iog; Sun, 12 Jun 2022 20:54:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg2CZj7Kfb3ydd8/eHnWBXNWx09AetHneWjpHkIIPPw8k6VTNEP9kiJKCz1dAJLeBXxXD4 X-Received: by 2002:a63:741:0:b0:3fc:6b3c:f9dd with SMTP id 62-20020a630741000000b003fc6b3cf9ddmr49093852pgh.351.1655092452636; Sun, 12 Jun 2022 20:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655092452; cv=none; d=google.com; s=arc-20160816; b=Q6kc5EqwOTEMIFaXGJd9khEfcqZYYwefKfvwc0Pe0W4s22k1FLkTk0xcA2G0mV64ee /QR8s3HbZN5I1K3rxLFinivp9xLWb0VR8Rggdy1xBJP25hS4q7is6oTJ9uMWiQUPSnQo X9+QLTPx728Sb+6BiyuLacJTtqlXvz3+sA0cXw108UoB8D/QUWgKHntVTus+GNWXS7Rw NYgst9URvdxg2SHxrgHDUkXzXXaJzmHALj5yCSzEa19zYCHHQ70eb7Fb6/65TOhX1V6q Qdql90g1wODedIKCUzgr9hvthaP3EST0NLgis1gcItzLeHn23zIHhxt1nLSwCevhw6c5 5ykw== 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; bh=LHSubEzFAn08WPEnB2B8JCnmTpz/MMH/0WA82kiYEkU=; b=p17wzc7Xzi3tQfuDMZajWeWelFgLRWhdLJ33D5DH0EV+8p4D8UWFFggc/ZDxNBPTe/ VjN/+croMFZq+3xLgUodGmtWwy2VDQ3eX9deUEjUokFgWbZQhlxz8e2Ll9POT47nXGbl KSiDqucc/CiQlVVHwVIqzgoT9SxavkykztPEYAezWtb+6CKxj6qLoFl6lcYWnQNWmv4C GS2p8iSEVXbXfIWS2PK1PxNfSwSfI+qAjL2GkN0kOBIcUp8uBYjDqoBu8+7YmzaZsBly KbxJ4LKXKJ0niumuaR5Ehzhz3jaoEl3VN7XVDHxP6hCVtnRPme1240CbzMoirdFO1cqr PwSQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk11-20020a056a02028b00b004019bf283d2si9759063pgb.554.2022.06.12.20.54.01; Sun, 12 Jun 2022 20:54:12 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238091AbiFMBni (ORCPT + 99 others); Sun, 12 Jun 2022 21:43:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236423AbiFMBna (ORCPT ); Sun, 12 Jun 2022 21:43:30 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3EE1403EE; Sun, 12 Jun 2022 18:43:25 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VG8Kp4F_1655084602; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VG8Kp4F_1655084602) by smtp.aliyun-inc.com; Mon, 13 Jun 2022 09:43:23 +0800 From: Yang Li To: martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Date: Mon, 13 Jun 2022 09:43:21 +0800 Message-Id: <20220613014321.107045-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 Fix following coccicheck error: ./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is NULL but dereferenced. Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/target/iscsi/iscsi_target_nego.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 9ce35a59962b..fb93a1173954 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -827,8 +827,7 @@ static bool iscsi_conn_auth_required(struct iscsit_conn *conn) */ se_nacl = conn->sess->se_sess->se_node_acl; if (!se_nacl) { - pr_debug("Unknown ACL %s is trying to connect\n", - se_nacl->initiatorname); + pr_debug("Unknown ACL is trying to connect\n"); return true; } -- 2.20.1.7.g153144c