]> code.ossystems Code Review - openembedded-core.git/commit
qemu: Add fixes for smc91c11 qemu segfaults on arm
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2015 14:35:49 +0000 (15:35 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Sep 2015 15:11:14 +0000 (16:11 +0100)
commit414a5256d6f00d5682ce226ee4bc49674ee6c614
tree8e03a75eecc40c7456b1ba0eb34f7614ac410bf5
parent32cbd4c57fc8ca097a18929fc404c07322ef36dd
qemu: Add fixes for smc91c11 qemu segfaults on arm

The smc91c111.c driver appears to have several issues. The can_receive()
function can return that the driver is ready when rx_fifo has not been
freed yet. There is also no sanity check of rx_fifo() in _receive() which
can lead to corruption of the rx_fifo array.

release_packet() can also call qemu_flush_queued_packets() before rx_fifo
has been cleaned up, resulting in cases where packets are submitted
for which there is not yet any space.

This patch therefore:

* fixes the logic in can_receive()
* adds logic to receive() as a sanity check
* moves the flush() calls to the correct places where data is ready
  to be received

Its currently undergoing discussion upstream about exactly which pieces
are the correct fix but for now, this stops the segfaults OE is seeing
which has to be an improvement.

[YOCTO #8234]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/qemu/qemu/smc91c111_fix.patch [new file with mode: 0644]
meta/recipes-devtools/qemu/qemu_2.4.0.bb