redboot rltk8139 crash fix (memcpy to 0)

Andrew Dyer AMDyer@gmail.com
Mon Oct 18 20:33:00 GMT 2004


This patch fixes a crash I see on my mips target with the realtek 8139
driver and redboot where memcpy gets called with a destination
address of zero.

As I understand it, the zero buffer address comes from
io/eth/current/src/stand_alone/eth_drv.c eth_drv_recv() when it
can't find a free recv. buffer.  It then uses a buffer address of zero
to signal the ethernet driver below it to ignore the packet.  The rltk8139
driver wasn't checking this condition, and so passed the 0 into memcpy.

In looking at code, I noticed at least the dp83816 driver seems to have the
same problem.  I didn't exhaustively check the other drivers.



-- 
Hardware, n.:
        The parts of a computer system that can be kicked.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ecos-rltk-memcpy-fix.txt
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20041018/abf23762/attachment.txt>


More information about the Ecos-patches mailing list