linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()
@ 2022-06-13  1:43 Yang Li
  2022-06-13 15:11 ` michael.christie
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Yang Li @ 2022-06-13  1:43 UTC (permalink / raw)
  To: martin.petersen
  Cc: linux-scsi, target-devel, linux-kernel, Yang Li, Abaci Robot

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 <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()
  2022-06-13  1:43 [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Yang Li
@ 2022-06-13 15:11 ` michael.christie
  2022-06-14  2:07 ` Martin K. Petersen
  2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: michael.christie @ 2022-06-13 15:11 UTC (permalink / raw)
  To: Yang Li, martin.petersen, Dmitry Bogdanov
  Cc: linux-scsi, target-devel, linux-kernel, Abaci Robot

On 6/12/22 8:43 PM, Yang Li wrote:
> 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 <abaci@linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>

This was just added in Martin's 5.20 tree in:

a75fcb0912a549c6c1da8395f33271ce06e84acd

scsi: target: iscsi: Extract auth functions

Do we need a Fixes or should the original patch be fixed?

Patch looks ok to me, so if we just add it:

Reviewed-by: Mike Christie <michael.christie@oracle.com>

> ---
>  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;
>  	}
>  



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()
  2022-06-13  1:43 [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Yang Li
  2022-06-13 15:11 ` michael.christie
@ 2022-06-14  2:07 ` Martin K. Petersen
  2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-14  2:07 UTC (permalink / raw)
  To: Yang Li
  Cc: martin.petersen, linux-scsi, target-devel, linux-kernel, Abaci Robot


Yang,

> Fix following coccicheck error:
> ./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is
> NULL but dereferenced.

Applied to 5.20/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()
  2022-06-13  1:43 [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Yang Li
  2022-06-13 15:11 ` michael.christie
  2022-06-14  2:07 ` Martin K. Petersen
@ 2022-06-17  2:21 ` Martin K. Petersen
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2022-06-17  2:21 UTC (permalink / raw)
  To: Yang Li
  Cc: Martin K . Petersen, target-devel, linux-scsi, Abaci Robot, linux-kernel

On Mon, 13 Jun 2022 09:43:21 +0800, Yang Li wrote:

> Fix following coccicheck error:
> ./drivers/target/iscsi/iscsi_target_nego.c:831:13-26: ERROR: se_nacl is
> NULL but dereferenced.
> 
> 

Applied to 5.20/scsi-queue, thanks!

[1/1] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required()
      https://git.kernel.org/mkp/scsi/c/35bf020bd8ab

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-17  2:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-13  1:43 [PATCH -next] scsi: target: iscsi: Fix NULL pointer dereference in iscsi_conn_auth_required() Yang Li
2022-06-13 15:11 ` michael.christie
2022-06-14  2:07 ` Martin K. Petersen
2022-06-17  2:21 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).