This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bug fix in cl_8900a ethernet driver


hi folks,

the file attached contains a patch to fix this bug.

In cs8900a_send, the cast from data to sdata is not safe. If data is not
aligned on a short boundary (even address), the 16bit read with the
pointer sdata, may return an unpredictible value or raise an alignement
error (depending the hardware).
The bug will happen if the variable odd_byte becomes true, and the next
packet has an aligned value for data. the first byte is joined with
saved_data, and the pointer data becomes odd.
This happens for me when running a web server. Sometimes the scatter
gather given in the arguments of cs8900a_send, is composed with several
buffer (most of them have an even number of bytes, but not all).

-- 
GONZALEZ Laurent
Silicomp Research Institute
Tel: 04 76 41 66 98

Attachment: cl_8900s.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]