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:	Thu, 26 Jun 2014 09:34:45 -0500
From:	scameron@...rdog.cce.hp.com
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-scsi@...r.kernel.org, jbottomley@...allels.com,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	scameron@...rdog.cce.hp.com
Subject: Re: [PATCH] [SCSI] hpsa: fix non-x86 builds

On Thu, Jun 26, 2014 at 03:44:52PM +0200, Arnd Bergmann wrote:
> commit 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
> turns on unit attention notifications, but got the change wrong for
> all architectures other than x86, which now store an uninitialized
> value into the device register.
> 
> Gcc helpfully warns about this:
> 
> ../drivers/scsi/hpsa.c: In function 'hpsa_set_driver_support_bits':
> ../drivers/scsi/hpsa.c:6373:17: warning: 'driver_support' is used uninitialized in this function [-Wuninitialized]
>   driver_support |= ENABLE_UNIT_ATTN;
>                  ^
> 
> This moves the #ifdef so only the prefetch-enable is conditional
> on x86, not also reading the initial register contents. 
> 
> 
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Fixes: 28e134464734 "[SCSI] hpsa: enable unit attention reporting"
> Cc: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
> Cc: stable@...r.kernel.org # v3.14+
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 31184b3..d0e487c 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -6365,9 +6365,9 @@ static inline void hpsa_set_driver_support_bits(struct ctlr_info *h)
>  {
>  	u32 driver_support;
>  
> -#ifdef CONFIG_X86
> -	/* Need to enable prefetch in the SCSI core for 6400 in x86 */
>  	driver_support = readl(&(h->cfgtable->driver_support));
> +	/* Need to enable prefetch in the SCSI core for 6400 in x86 */
> +#ifdef CONFIG_X86
>  	driver_support |= ENABLE_SCSI_PREFETCH;
>  #endif
>  	driver_support |= ENABLE_UNIT_ATTN;

Thanks.

-- steve

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