Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1527579

Re: [PATCH] scsi: hpsa: fix uninitialized variable access

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH] scsi: hpsa: fix uninitialized variable access
Date 2016-11-22 16:00 +0100
Message-ID <sGkI9-8uI-11@gated-at.bofh.it> (permalink)
References <sGkoN-8oh-33@gated-at.bofh.it> <sGkyt-8rC-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday, November 22, 2016 3:47:09 PM CET Hannes Reinecke wrote:
> index 05f7782..ee6f852 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -2031,7 +2031,7 @@ static struct hpsa_scsi_dev_t
> *lookup_hpsa_scsi_dev(struct ctlr_info *h,
> 
>  static int hpsa_slave_alloc(struct scsi_device *sdev)
>  {
> -       struct hpsa_scsi_dev_t *sd;
> +       struct hpsa_scsi_dev_t *sd = NULL;
>         unsigned long flags;
>         struct ctlr_info *h;
> 
> 

I try not to add initializations like this in general, since they
prevent us from finding the bug, but here that seems fine too
as we immediately test it for NULL anyway.

Can you follow up with a patch to do that?

	Arnd

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] scsi: hpsa: fix uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2016-11-22 15:40 +0100
  Re: [PATCH] scsi: hpsa: fix uninitialized variable access Hannes Reinecke <hare@suse.com> - 2016-11-22 15:50 +0100
    Re: [PATCH] scsi: hpsa: fix uninitialized variable access Arnd Bergmann <arnd@arndb.de> - 2016-11-22 16:00 +0100

csiph-web