lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 29 Oct 2008 10:44:12 -0500
From:	Mike Christie <michaelc@...wisc.edu>
To:	Stephen Rothwell <sfr@...b.auug.org.au>
CC:	open-iscsi@...glegroups.com,
	"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
	LKML <linux-kernel@...r.kernel.org>, linux-scsi@...r.kernel.org
Subject: Re: [PATCH] scsi: fix uninitialized variable in iscsi

Stephen Rothwell wrote:
> [Resend to get through vger's filters, sorry]
> 
> drivers/scsi/scsi_transport_iscsi.c: In function 'iscsi_add_session':
> drivers/scsi/scsi_transport_iscsi.c:704: warning: 'err' may be used uninitialized in this function
> 
> Indeed the error path can be taken without err being set.
> 
> Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
> ---
>  drivers/scsi/scsi_transport_iscsi.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> I don't know if ENOMEM is the proper error code to return.
> 
> diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
> index 4a803eb..99855db 100644
> --- a/drivers/scsi/scsi_transport_iscsi.c
> +++ b/drivers/scsi/scsi_transport_iscsi.c
> @@ -719,6 +719,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
>  						 "Too many iscsi targets. Max "
>  						 "number of targets is %d.\n",
>  						 ISCSI_MAX_TARGET - 1);
> +			err = -ENOMEM;
>  			goto release_host;
>  		}
>  	}

Thanks for the patch.

I have a patch for this from Benny Halevy already.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ