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.1211201104550.1692-100000@iolanthe.rowland.org>
Date:	Tue, 20 Nov 2012 11:09:38 -0500 (EST)
From:	Alan Stern <stern@...land.harvard.edu>
To:	harvey yang <harvey.huawei.yang@...il.com>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] usb: add 'usb_get_intf()' call into the probe methods of
 drivers for usb interfaces.

On Mon, 19 Nov 2012, harvey yang wrote:

> Hi, all
> I checked many usb drivers in the mainline kernel which do not record
> this reference in their probe methods. But according to the documents
> about this function, we shoud record this reference in our probe
> methods, just as the call to 'usb_get_dev()' to reference a usb
> device. Are these usb drivers right or we need to fix them?

The drivers are right; they do not need to be fixed.  The reason is
because the drivers will be unbound automatically when the device or
interface is unregistered.

The only reason for a driver to take a reference would be if it wanted 
to continue using the device after it was unbound.  But drivers aren't 
supposed to do that.

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