aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/scatterwalk.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-06-06 22:11:30 +0200
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-06-19 00:12:35 +0200
commit5cb84067d646fa3889463129dad8b218806b4698 (patch)
tree081afef7668bf0e3e496fbefbe2d6256efb2d2dd /crypto/scatterwalk.c
parentaffc9c24ade666f9903163c12686da567dbfe06f (diff)
downloadkernel_samsung_smdk4412-5cb84067d646fa3889463129dad8b218806b4698.zip
kernel_samsung_smdk4412-5cb84067d646fa3889463129dad8b218806b4698.tar.gz
kernel_samsung_smdk4412-5cb84067d646fa3889463129dad8b218806b4698.tar.bz2
firewire: fill_bus_reset_event needs lock protection
Callers of fill_bus_reset_event() have to take card->lock. Otherwise access to node data may oops if node removal is in progress. A lockless alternative would be - event->local_node_id = card->local_node->node_id; + tmp = fw_node_get(card->local_node); + event->local_node_id = tmp->node_id; + fw_node_put(tmp); and ditto with the other node pointers which fill_bus_reset_event() accesses. But I went the locked route because one of the two callers already holds the lock. As a bonus, we don't need the memory barrier anymore because device->generation and device->node_id are written in a card->lock protected section. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Diffstat (limited to 'crypto/scatterwalk.c')
0 files changed, 0 insertions, 0 deletions