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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1478365519.3242.10.camel@linux.intel.com>
Date:   Sat, 05 Nov 2016 10:05:19 -0700
From:   Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
To:     Jiri Kosina <jikos@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH] HID: intel-ish-hid: initialize ts_format.reserved

On Sat, 2016-11-05 at 16:15 +0100, Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@...e.cz>
> 
> ts_format.reserved is not used anywhere yet, but the compiler
> generates a 
> warning when the struct's (uninitialized) field is being copied
> around
> 
> drivers/hid/intel-ish-hid/ipc/ipc.c: In function
> ‘write_ipc_from_queue’:
> drivers/hid/intel-ish-hid/ipc/ipc.c:316: warning:
> ‘ts_format.reserved’ may be used uninitialized in this function
> 
> Avoid this by force-initializing the field to zero.
> 
> Signed-off-by: Jiri Kosina <jkosina@...e.cz>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>

> ---
>  drivers/hid/intel-ish-hid/ipc/ipc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/intel-ish-hid/ipc/ipc.c b/drivers/hid/intel-
> ish-hid/ipc/ipc.c
> index 0c9ac4d..417cd07 100644
> --- a/drivers/hid/intel-ish-hid/ipc/ipc.c
> +++ b/drivers/hid/intel-ish-hid/ipc/ipc.c
> @@ -310,6 +310,7 @@ static int write_ipc_from_queue(struct
> ishtp_device *dev)
>                                                 ((uint32_t)tv_utc.tv_
> usec);
>                 ts_format.ts1_source = HOST_SYSTEM_TIME_USEC;
>                 ts_format.ts2_source = HOST_UTC_TIME_USEC;
> +               ts_format.reserved = 0;
>  
>                 time_update.primary_host_time = usec_system;
>                 time_update.secondary_host_time = usec_utc;
> -- 
> 1.9.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ