mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
firewire: core: use spinlock without irqsave for card topology_map member
Asynchronous packet callbacks are now always invoked in process context. Therefore, the topology_map member is not accessed from IRQ context. Use spin_lock() for the topology_map member since disabling local IRQs is unnecessary. Link: https://lore.kernel.org/r/20260919115017.859169-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
parent
d1573b0d90
commit
00bbf49783
|
|
@ -1260,9 +1260,7 @@ static void handle_topology_map(struct fw_card *card, struct fw_request *request
|
|||
|
||||
start = (offset - topology_map_region.start) / 4;
|
||||
|
||||
// NOTE: This can be without irqsave when we can guarantee that fw_send_request() for local
|
||||
// destination never runs in any type of IRQ context.
|
||||
scoped_guard(spinlock_irqsave, &card->topology_map.lock)
|
||||
scoped_guard(spinlock, &card->topology_map.lock)
|
||||
memcpy(payload, &card->topology_map.buffer[start], length);
|
||||
|
||||
fw_send_response(card, request, RCODE_COMPLETE);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user