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: <8763lnnbbm.fsf@nokia.com>
Date:	Sat, 13 Dec 2008 21:07:25 +0200
From:	Kalle Valo <kalle.valo@...ia.com>
To:	dsilvers@...tec.co.uk
Cc:	netdev@...r.kernel.org
Subject: Re: [Patch] Micrel KS8695 intergrated ethernet driver

Daniel Silverstone <dsilvers@...tec.co.uk> writes:

>> > +       if (ksp->tx_buffers[buff_n].skb) {
>> > +               /* This slot is used, try later */
>> > +               spin_unlock_irq(&ksp->txq_lock);
>> > +               return -EAGAIN;
>> Since you already tested tx_ring_used, wouldn't this indicate a bug?
>
> Yep, this was old code before I kept a track in tx_ring_used. Changed
> to:
>
> BUG_ON(ksp->tx_buffers[buff_n].skb);

I would say that a network driver should never use BUG_ON(), it just
makes both user's and developer's life difficult because the whole
kernel will stop the execution. WARN_ON() is much nicer, it just
prints a nice warning to the log which then can be reported either
manually or automatically.

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