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:	Thu, 16 Jul 2009 10:12:41 +0300
From:	"Rémi Denis-Courmont" 
	<remi.denis-courmont@...ia.com>
To:	ext Oliver Neukum <oliver@...kum.org>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: [PATCH] USB host CDC Phonet network interface driver

On Wednesday 15 July 2009 17:20:31 ext Oliver Neukum wrote:
> Am Mittwoch, 15. Juli 2009 15:59:01 schrieb Rémi Denis-Courmont:
>
> Hello,
>
> > +	netif_stop_queue(dev);
> > +	if (atomic_inc_return(&pnd->tx_queue) < dev->tx_queue_len)
> > +		netif_wake_queue(dev);
>
> This is unelegant.

But I cannot think of any alternative that would not involve a spin lock and 
disable IRQs. There is a race between qdisc and USB TX completion here.

I'm not sure what you're trying to suggest...?

> > +static void usbpn_disconnect(struct usb_interface *intf)
> > +{
> > +	struct usbpn_dev *pnd = usb_get_intfdata(intf);
> > +
>
> What happens if this happens in the unexpected order?

Right, the data interface gets released twice. This "works" since 
usb_driver_release_interface() has an explicit check. I will try to clean it 
up anyway.

> > +	if (intf != pnd->data_intf) {
> > +		usb_driver_release_interface(&usbpn_driver, pnd->data_intf);
> > +		return;
> > +	}
> > +
> > +	unregister_netdev(pnd->dev);
> > +	usb_put_dev(pnd->usb);
> > +}

Thanks for the review.

-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki

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