Re: [PATCH] Input: synaptics - clear device info before filling in

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 28, 2017 at 10:27:07PM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> synaptics_query_hardware() was being passed a
> 'struct synaptics_device_info' in uninitialized stack memory, then not
> always initializing all fields.  This caused garbage to show up in
> certain fields, making the touchpad unusable.
> 
> Fix by zeroing the device info, so all fields default to 0.
> 
> Fixes: 6c53694fb222 ("Input: synaptics - split device info into a separate structure")
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Applied, thank you.

> ---
>  drivers/input/mouse/synaptics.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 131df9d3660f..4f97970abc94 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -397,6 +397,8 @@ static int synaptics_query_hardware(struct psmouse *psmouse,
>  {
>  	int error;
>  
> +	memset(info, 0, sizeof(*info));
> +
>  	error = synaptics_identify(psmouse, info);
>  	if (error)
>  		return error;
> -- 
> 2.13.0
> 

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux