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, 7 Jan 2010 11:08:38 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Bastian Blank <waldi@...ian.org>
Cc:	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Ping Cheng <pingc@...om.com>
Subject: Re: [PATCH 7/7] Input: wacom - Fail on missing features

On Thursday 07 January 2010 10:30:09 am Bastian Blank wrote:
> The driver needs a correct setup feature list, fail if it is not
> correctly set.
> 
> Signed-off-by: Bastian Blank <waldi@...ian.org>
> ---
>  drivers/input/tablet/wacom_sys.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/input/tablet/wacom_sys.c
>  b/drivers/input/tablet/wacom_sys.c index 41a631b..c44b9f0 100644
> --- a/drivers/input/tablet/wacom_sys.c
> +++ b/drivers/input/tablet/wacom_sys.c
> @@ -534,6 +534,9 @@ static int wacom_probe(struct usb_interface *intf,
>  const struct usb_device_id *i struct input_dev *input_dev;
>  	int error = -ENOMEM;
> 
> +	if (!features)
> +		return -EIO;
> +

-EINVAL is probably better.

>  	wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL);
>  	wacom_wac = kzalloc(sizeof(struct wacom_wac), GFP_KERNEL);
>  	input_dev = input_allocate_device();
> 

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