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: <9C2E97E7BED9426ABE0FF4F63E12E33D@realtek.com.tw>
Date:	Wed, 20 Nov 2013 11:28:46 +0800
From:	hayeswang <hayeswang@...ltek.com>
To:	'David Miller' <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, 'nic_swsd' <nic_swsd@...ltek.com>,
	<linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>
Subject: RE: [PATCH net v4 3/4] r8152: support stopping/waking tx queue

 David Miller [mailto:davem@...emloft.net] 
[...]
> This is racy.
> 
> You have nothing which synchronizes r8152_tx_agg_fill() and 
> rtl8152_start_xmit(),
> therefore:
> 
> > +	if (netif_queue_stopped(tp->netdev))
> > +		netif_wake_queue(tp->netdev);
> > +
> 
> A netif_stop_queue() can occur right after the 
> netif_queue_stopped() check,
> meaning you can end up with the queue being stopped forever 
> and the TX queue
> stuck.

If the situation occurs, it means there is no tx buffer at that time. If the
netif_wake_queue() is called, only one more packet would be queued and the tx
queue would be stopped again after calling rtl8152_start_xmit(). That is, it
is not necessary to wake the queue. Besides, after the tx is completed, another
tasklet would be scheduled if there is any packet which is queued in the list.
That is, the r8152_tx_agg_fill() would be called and the netif_queue_stopped()
would be check againg, so the tx queue would not be stopped forever.
 
Best Regards,
Hayes

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