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:	Wed, 3 Feb 2016 10:14:20 +0100 (CET)
From:	Jiri Kosina <jikos@...nel.org>
To:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
cc:	Nicholas Krause <xerofoify@...il.com>, linux-input@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hid:Add missing error checking in mt_probe for creating
 sysfs_create_group

On Wed, 3 Feb 2016, Benjamin Tissoires wrote:

> > diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> > index 296d499..46ebf06 100644
> > --- a/drivers/hid/hid-multitouch.c
> > +++ b/drivers/hid/hid-multitouch.c
> > @@ -1133,6 +1133,8 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
> >  		return ret;
> >  
> >  	ret = sysfs_create_group(&hdev->dev.kobj, &mt_attribute_group);
> > +	if (ret)
> > +		return ret;
> 
> I am not particularly happy with a hard failure here in case the sysfs
> group doesn't bind. The group is mainly used for debug, and I am not
> sure anybody but me uses it nowadays.
> 
> Could you amend the patch to put a warning in case of a failure but
> still continue?

Yeah. And also in case of hard failure, some cleanup would have to be done 
anyway (hid_hw_start() has already happened, etc).

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ