From: Daniel Ritz <daniel.ritz@gmx.ch>
To: Javier Achirica <achirica@telefonica.net>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-net <linux-net@vger.kernel.org>,
Jean Tourrilhes <jt@bougret.hpl.hp.com>,
Mike Kershaw <dragorn@melchior.nerv-un.net>
Subject: Re: [PATCH 2.5] fixes for airo.c
Date: Mon, 21 Jul 2003 19:49:29 +0200 [thread overview]
Message-ID: <200307211949.30513.daniel.ritz@gmx.ch> (raw)
In-Reply-To: <Pine.SOL.4.30.0307211252190.25549-100000@tudela.mad.ttd.net>
On Mon July 21 2003 13:00, Javier Achirica wrote:
>
> Daniel,
>
> Thank you for your patch. Some comments about it:
>
> - I'd rather fix whatever is broken in the current code than going back to
> spinlocks, as they increase latency and reduce concurrency. In any case,
> please check your code. I've seen a spinlock in the interrupt handler that
> may lock the system.
but we need to protect from interrupts while accessing the card and waiting for
completion. semaphores don't protect you from that. spin_lock_irqsave does. the
spin_lock in the interrupt handler is there to protect from interrupts from
other processors in a SMP system (see Documentation/spinlocks.txt) and is btw.
a no-op on UP. and semaphores are quite heavy....
> - The fix for the transmit code you mention, is about fixing the returned
> value in case of error? If not, please explain it to me as I don't see any
> other changes.
fixes:
- return values
- when to free the skb, when not
- disabling the queues
- netif_wake_queue called from the interrupt handler only (and on the right
net_device)
- i think the priv->xmit stuff and then the schedule_work is evil:
if you return 0 from the dev->hard_start_xmit then the network layer assumes
that the packet was kfree_skb()'ed (which does only frees the packet when the
refcount drops to zero.) this is the cause for the keventd killing, for sure!
if you return 0 you already kfree_skb()'ed the packet. and that's it.
> - Where did you fix a buffer overflow?
- for(s = &statr->beaconPeriod; s <= &statr->_reserved[9]; s++)
+ for(s = &statr->beaconPeriod; s <= &statr->_reserved1; s++)
...which you also fixed in your patchset. (which is harmless on little-endian
machines and evil on big-endian machines)
rgds
-daniel
>
> I submitted to Jeff an updated version just before you sent your e-mail.
> It incorporates most of your fixes expect for the possible loop-forever.
> It's more stable that the one in the current kernel tree.
>
> Javier Achirica
>
> On Fri, 18 Jul 2003, Daniel Ritz wrote:
>
> > in 2.4.20+ airo.c is broken and can even kill keventd. this patch fixes it:
> > - sane locking with spinlocks and irqs disabled instead of the buggy locking
> > with semaphores
> > - fix transmit code
> > - safer unload ordering of disable irq, unregister_netdev, kfree
> > - fix possible loop-forever bug
> > - fix a buffer overflow
> >
> > a kernel 2.4 version of the patch is tested by some people with good results.
> > against 2.6.0-test1-bk. please apply.
> >
> >
> > rgds
> > -daniel
>
>
next prev parent reply other threads:[~2003-07-21 17:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-17 22:15 [PATCH 2.4] fixes for airo.c Daniel Ritz
2003-07-21 11:00 ` [PATCH 2.5] " Javier Achirica
2003-07-21 12:37 ` Christoph Hellwig
2003-07-21 13:46 ` Javier Achirica
2003-07-21 15:08 ` Mike Kershaw
2003-07-21 18:56 ` Javier Achirica
2003-07-21 17:49 ` Daniel Ritz [this message]
2003-07-21 19:44 ` Javier Achirica
2003-07-21 21:01 ` Daniel Ritz
2003-07-21 21:24 ` Javier Achirica
2003-07-22 8:15 ` Javier Achirica
2003-07-23 9:36 ` Daniel Ritz
2003-07-23 10:26 ` Javier Achirica
2003-07-23 17:56 ` Daniel Ritz
2003-07-23 18:03 ` Alan Cox
2003-07-23 18:20 ` Javier Achirica
2003-07-23 18:10 ` Javier Achirica
2003-07-23 18:20 ` Alan Cox
2003-07-23 18:52 ` Daniel Ritz
2003-07-23 20:43 ` Jeff Garzik
2003-07-23 21:19 ` Daniel Ritz
2003-07-24 17:07 ` Jeff Garzik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200307211949.30513.daniel.ritz@gmx.ch \
--to=daniel.ritz@gmx.ch \
--cc=achirica@telefonica.net \
--cc=dragorn@melchior.nerv-un.net \
--cc=jgarzik@pobox.com \
--cc=jt@bougret.hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-net@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox