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]
Message-ID: <Pine.LNX.4.44L0.1103241050520.2006-100000@iolanthe.rowland.org>
Date:	Thu, 24 Mar 2011 10:55:08 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Sergey Senozhatsky <sergey.senozhatsky@...il.com>
cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	Chris Wright <chrisw@...s-sol.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: check device_create_file() return code in usb_create_sysfs_intf_files()

On Thu, 24 Mar 2011, Sergey Senozhatsky wrote:

> Hello,
> 
> I just noticed that usb_create_sysfs_intf_files() ignores device_create_file() 
> return code and sets intf->sysfs_files_created to 1, even if sysfs_add_file_mode() 
> returned -ENOMEM (or later sysfs_add_one() returned -EEXIST).
> 
> Shouldn't we check retval for 0 before setting intf->sysfs_files_created?

No.  We want this routine to succeed even if the sysfs files can't be 
created.  The interface string attribute is more or less optional.

It would be okay to add a comment explaining this, so that other people
don't make the same mistake (which has already happened -- you're not
the first).

Alan Stern

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