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] [day] [month] [year] [list]
Date:	Thu, 17 May 2012 10:03:41 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, virtualization@...ts.osdl.org,
	ohering@...e.com
Subject: Re: [PATCH 1/1] Drivers: hid: hid-hyperv.c: Set the hid drvdata
 correctly

On Wed, 16 May 2012, K. Y. Srinivasan wrote:

> Set the hid drvdata prior to invoking hid_add_device() as hid_add_device()
> expects this state to be set. This bug was introduced in the recent hid
> changes that were made in:
> 
> commit 07d9ab4f0e52cb2a383596e5ebbbd20232501393
> HID: hid-hyperv: Do not use hid_parse_report() directly
> 
> Signed-off-by: K. Y. Srinivasan <kys@...rosoft.com>
> Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
> ---
>  drivers/hid/hid-hyperv.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
> index 032e6c0..3d62781 100644
> --- a/drivers/hid/hid-hyperv.c
> +++ b/drivers/hid/hid-hyperv.c
> @@ -516,11 +516,12 @@ static int mousevsc_probe(struct hv_device *device,
>  
>  	sprintf(hid_dev->name, "%s", "Microsoft Vmbus HID-compliant Mouse");
>  
> +	hid_set_drvdata(hid_dev, device);
> +
>  	ret = hid_add_device(hid_dev);
>  	if (ret)
>  		goto probe_err1;
>  
> -	hid_set_drvdata(hid_dev, device);
>  
>  	ret = hid_parse(hid_dev);
>  	if (ret) {

Applied, thanks KY.

-- 
Jiri Kosina
SUSE Labs
--
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