linux/drivers/firewire
Clemens Ladisch a1f805e5e7 firewire: ohci: fix race in AR split packet handling
When handling an AR buffer that has been completely filled, we assumed
that its descriptor will not be read by the controller and can be
overwritten.  However, when the last received packet happens to end at
the end of the buffer, the controller might not yet have moved on to the
next buffer and might read the branch address later.  If we overwrite
and free the page before that, the DMA context will either go dead
because of an invalid Z value, or go off into some random memory.

To fix this, ensure that the descriptor does not get overwritten by
using only the actual buffer instead of the entire page for reassembling
the split packet.  Furthermore, to avoid freeing the page too early,
move on to the next buffer only when some data in it guarantees that the
controller has moved on.

This should eliminate the remaining firewire-net problems.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: 2.6.22-2.6.36 <stable@kernel.org>
Tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2010-10-30 23:37:19 +02:00
..
Kconfig tools/firewire: add userspace front-end of nosy 2010-07-27 11:04:11 +02:00
Makefile firewire: new driver: nosy - IEEE 1394 traffic sniffer 2010-07-27 11:04:10 +02:00
core-card.c Merge firewire branches to be released post v2.6.35 2010-08-02 10:09:04 +02:00
core-cdev.c Merge firewire branches to be released post v2.6.35 2010-08-02 10:09:04 +02:00
core-device.c Merge firewire branches to be released post v2.6.35 2010-08-02 10:09:04 +02:00
core-iso.c Merge firewire branches to be released post v2.6.35 2010-08-02 10:09:04 +02:00
core-topology.c firewire: core: fix fw_send_request kerneldoc comment 2010-07-13 09:47:47 +02:00
core-transaction.c firewire: core: do not use del_timer_sync() in interrupt context 2010-08-19 20:28:25 +02:00
core.h firewire: add isochronous multichannel reception 2010-07-29 23:09:18 +02:00
net.c firewire: net: fix unicast reception RCODE in failure paths 2010-08-19 20:28:25 +02:00
nosy-user.h firewire: nosy: endianess fixes and annotations 2010-07-27 11:04:11 +02:00
nosy.c firewire: nosy: use generic printk macros 2010-07-27 11:04:11 +02:00
nosy.h firewire: nosy: misc cleanups 2010-07-27 11:04:10 +02:00
ohci.c firewire: ohci: fix race in AR split packet handling 2010-10-30 23:37:19 +02:00
ohci.h firewire: ohci: fix TI TSB82AA2 regression since 2.6.35 2010-10-17 14:09:12 +02:00
sbp2.c firewire: sbp2: fix stall with "Unsolicited response" 2010-08-19 20:28:25 +02:00