summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2010-10-25 11:43:05 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-10-30 23:37:20 +0200
commit693fa7792e9db9f32da9436e633976fbacd04b55 (patch)
tree227078047db9c8f3497133769b1b9b1f7b681fa1 /kernel
parent837596a61ba8f9bb53bb7aa27d17328ff9b2bcd5 (diff)
downloadop-kernel-dev-693fa7792e9db9f32da9436e633976fbacd04b55.zip
op-kernel-dev-693fa7792e9db9f32da9436e633976fbacd04b55.tar.gz
firewire: ohci: fix race when reading count in AR descriptor
If the controller is storing a split packet and therefore changing d->res_count to zero between the two reads by the driver, we end up with an end pointer that is not at a packet boundary, and therefore overflow the buffer when handling the split packet. To fix this, read the field once, atomically. The compiler usually merges the two reads anyway, but for correctness, we have to enforce it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud