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]
Message-ID: <Pine.LNX.4.44L0.1109031559300.29295-100000@netrider.rowland.org>
Date:	Sat, 3 Sep 2011 16:02:26 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Kautuk Consul <consul.kautuk@...il.com>
cc:	Oliver Neukum <oneukum@...e.de>, <netdev@...r.kernel.org>,
	<linux-usb@...r.kernel.org>
Subject: Re: [PATCH 1/1] drivers/net/usb/usbnet.c: No need for usb_free_urb
 in rx_complete

On Sat, 3 Sep 2011, Kautuk Consul wrote:

> usb_hcd_giveback_urb frees the urb irrespective of any return
> value from the urb->complete function. It calls usb_put_urb which 
> is #defined to usb_free_urb, so maybe we shouldn't be freeing this 
> from rx_complete.

usb_free_urb() doesn't free its argument unless the refcount drops to 
0.  The refcount is incremented during usb_hcd_submit_urb(), and the 
decrement during usb_hcd_giveback_urb() merely undoes this increment.

> But I can't get around the fact that this has not been detected as a problem 
> till now, so I could be quite wrong about this. :)

Quite probably.  :-)

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ