Tulip bug "resolution"
Some may remember I put a hack in drivers/net/tulip/interrupt.c to avoid a null pointer deref caused by a data structure being referenced before being allocated. I've only seen this on B180 I think. I posted my patch to the sourceforge tulip project and received the following reply. I don't know enough about the network driver stuff and our changes to it to figure out what to do next. Maybe this bug has magically disappeared but I bet not.
-P
------- Forwarded Message
To: [email protected], [email protected]
Subject: [Patch #103298] [Bug #124918] packet received prior to buffer allocation cr
Message-Id: <[email protected]>
Date: Tue, 23 Jan 2001 14:46:14 -0800
Patch #103298 has been updated.
Project: tulip
Category: Bug fix
Status: Open
Submitted by: paulbame
Assigned to : jgarzik
Summary: [Bug #124918] packet received prior to buffer allocation cr
Follow-Ups:
Date: 2001-Jan-23 14:46
By: nobody
Comment:
bogus patch -- the Tulip receiver is started up after the skbuffs are allocated. This user must have broken hardware.
- -------------------------------------------------------
- ------------------------------------------------------- For more info, visit:
http://sourceforge.net/patch/?func=detailpatch&patch_id=103298&group_id=13004
------- End of Forwarded Message
Quoted 4 lines · Paul Bame
Some may remember I put a hack in
drivers/net/tulip/interrupt.cto avoid a null pointer deref caused by a data structure being referenced before being allocated. I've only seen this on B180 I think.
...
Quoted 1 line
Maybe this bug has magically disappeared but I bet not.
I suspect it's really fixed.
Here are some thoughts on tulip and IRQ initialization.
In tulip_open():
o calls request_irq(... &tulip_interrupt, ...)
o call tulip_init_ring() - sets tp->rx_buffers[].skb to null before allocating them.
...
If a pending IRQ is waiting in Dino, the handler will get called when the IRQ is enabled by request_irq(). This is potentially a bug in the Dino IRQ handling...so I looked and saw:
/* Emulate "Level Triggered" Interrupt
** Basically, a driver is blowing it if the IRQ line is asserted ** while the IRQ is disabled. But tulip.c seems to do that.... ** Give 'em a kluge award and a nice round of applause! **
** The gsc_write will generate an interrupt which invokes dino_isr(). ** dino_isr() will read IPR and find nothing. But then catch this ** when it also checks ILR.
*/
But note that tulip.c no longer exists. Tulip has been restructured into multiple files under drivers/net/tulip/. The thing to do is reproduce this problem with current bits. If it doesn't happen, then the initialization code in tulip *was* fixed and we should remove the comment in drivers/gsc/dino.c as well.
grant
Grant Grundler
Unix Systems Enablement Lab
+1.408.447.7253