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:	Sat, 5 Jan 2013 13:08:37 +0100
From:	Rafał Miłecki <zajec5@...il.com>
To:	Francois Romieu <romieu@...zoreil.com>
Cc:	netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH] bgmac: driver for GBit MAC core on BCMA bus

2013/1/3 Francois Romieu <romieu@...zoreil.com>:
> Rafał Miłecki <zajec5@...il.com> :
>> > The driver should stop queueing after its processing if it detects that
>> > it can't handle more requests.
>>
>> I think it's what the code does... netif_stop_queue and return
>> NETDEV_TX_BUSY. Anything wrong about it?
>
> The driver does not hold its promise to send the packet. It should
> netif_stop_queue and return NETDEV_TX_OK after the last transmitted
> packet.

We really need some good explanation for NETDEV_TX_BUSY somewhere
(documentation!).

I've checked some drivers and:

1) b44.c
In case of:
> if (unlikely(TX_BUFFS_AVAIL(bp) < 1)) {
it does netif_stop_queue and returns NETDEV_TX_BUSY

2) sky2.c
In case of:
> if (unlikely(tx_avail(sky2) < tx_le_req(skb)))
it just returns NETDEV_TX_BUSY

3) jme.2
In case of:
> if (unlikely(idx < 0)) {
it does netif_stop_queue and returns NETDEV_TX_BUSY

4) de2104x.c
In case of:
> if (tx_free == 0) {
it does netif_stop_queue and returns NETDEV_TX_BUSY

So there are many drivers doing the same mistake I did.

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