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]
Date:	Tue, 19 Nov 2013 15:25:36 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	hayeswang@...ltek.com
Cc:	netdev@...r.kernel.org, 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

From: Hayes Wang <hayeswang@...ltek.com>
Date: Tue, 19 Nov 2013 11:25:10 +0800

> The maximum packet number which a tx aggregation buffer could contain
> is the buffer size / (packet size + descriptor size).
> 
> If the tx buffer is empty and the tx queue length is more than the
> maximum value which is defined above, stop the tx queue. Wake the tx
> queue after any queued packet is filled in a available tx buffer.
> 
> Signed-off-by: Hayes Wang <hayeswang@...ltek.com>

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.

I am finding this patch series _very_ tiring, every single time I take
the time to review it, I find major problems.
--
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