summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-07-24 00:16:00 +0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 21:29:22 +0400
commit3e98eab46d1a482532c653bdb0c006413654d171 (patch)
treeb7135fa6db9b39b3f351a6030df0131fb0514163 /net
parentd4018d7fa63d25f3e1ecf6949fca6b81a182231a (diff)
downloadlinux-3e98eab46d1a482532c653bdb0c006413654d171.tar.xz
ieee1394: sbp2: safer initialization of status fifo
Sbp2's copy of the status fifo was cleared when management ORBs or new command ORBs were prepared. The latter had potential for a race condition if the block layer's soft IRQ and the 1394 LLD's interrupt handler ran on different CPUs. It would also yield wrong status if a command was completed with non-zero completion status before other commands that had zero completion status, and no new command was enqueued in the meantime. Now, the status buffer is cleared right before it is written. Thus it ends up in the following simpler and safer access pattern: - sbp2_alloc_device: allocates and implicitly clears once, - sbp2_handle_status_write: clears, writes, and reads, - sbp2_query_logins, sbp2_login_device, sbp2_reconnect_device: read. The latter three do not race with sbp2_handle_status_write because of how the protocol works. As a tiny optimization, the first two quadlets of the status never need to be cleared. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions