linux-hardened/drivers/firewire
Stefan Richter 5cb84067d6 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>
2008-06-19 00:12:35 +02:00
..
fw-card.c firewire: cleanups 2008-04-18 17:55:37 +02:00
fw-cdev.c firewire: fill_bus_reset_event needs lock protection 2008-06-19 00:12:35 +02:00
fw-device.c Convert asm/semaphore.h users to linux/semaphore.h 2008-04-18 22:22:54 -04:00
fw-device.h firewire: reread config ROM when device reset the bus 2008-04-18 17:55:36 +02:00
fw-iso.c firewire: cleanups 2008-04-18 17:55:37 +02:00
fw-ohci.c firewire: fw-ohci: write selfIDBufferPtr before LinkControl.rcvSelfID 2008-06-19 00:12:35 +02:00
fw-ohci.h firewire: fw-ohci: log regAccessFail events 2008-04-18 17:55:34 +02:00
fw-sbp2.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2008-05-02 13:52:35 -07:00
fw-topology.c firewire: fix synchronization of gap counts 2008-04-18 17:55:36 +02:00
fw-topology.h firewire: reread config ROM when device reset the bus 2008-04-18 17:55:36 +02:00
fw-transaction.c firewire: don't panic on invalid AR request buffer 2008-06-19 00:12:34 +02:00
fw-transaction.h firewire: cleanups 2008-04-18 17:55:37 +02:00
Kconfig firewire: debug interrupt events 2008-04-18 17:55:34 +02:00
Makefile firewire: prefix modules with firewire- instead of fw- 2007-05-27 23:21:01 +02:00