Skip to content

Commit 3733912

Browse files
vsyrjalatakaswie
authored andcommitted
firewire: core: Initialize topology_map.lock
Lockdep barfs on the new uninitialized spinlock. Initialize it. protip: enable lockdep (CONFIG_PROVE_LOCKING=y) when doing locking changes firewire_ohci 0000:02:01.1: added OHCI v1.10 device as card 0, 4 IR + 4 IT contexts, quirks 0x11 INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 0 UID: 0 PID: 1042 Comm: irq/17-firewire Not tainted 6.17.0-rc2-cl-bisect2-00026-g7d138cb269db #136 PREEMPT Hardware name: Dell Inc. Latitude E5400 /0D695C, BIOS A19 06/13/2013 Call Trace: <TASK> dump_stack_lvl+0x6d/0xa0 register_lock_class+0x783/0x790 ? find_held_lock+0x2b/0x80 ? __mod_timer+0x110/0x320 ? __mod_timer+0x110/0x320 __lock_acquire+0x405/0x2600 lock_acquire+0xca/0x2e0 ? fw_core_handle_bus_reset+0x888/0xca0 [firewire_core] ? fw_core_handle_bus_reset+0x878/0xca0 [firewire_core] ? fw_core_handle_bus_reset+0x878/0xca0 [firewire_core] _raw_spin_lock+0x2e/0x40 ? fw_core_handle_bus_reset+0x888/0xca0 [firewire_core] fw_core_handle_bus_reset+0x888/0xca0 [firewire_core] handle_selfid_complete_event+0x35c/0x7a0 [firewire_ohci] ? irq_thread+0x8d/0x280 irq_thread_fn+0x18/0x50 irq_thread+0x15a/0x280 ? irq_check_status_bit+0x100/0x100 ? lockdep_hardirqs_on+0x78/0x100 ? irq_finalize_oneshot.part.0+0xc0/0xc0 ? irq_forced_thread_fn+0x60/0x60 kthread+0x114/0x200 ? kthreads_online_cpu+0x110/0x110 ret_from_fork+0x158/0x1e0 ? kthreads_online_cpu+0x110/0x110 ret_from_fork_asm+0x11/0x20 </TASK> Reported-by: Erhard Furtner <[email protected]> Fixes: 7d138cb ("firewire: core: use spin lock specific to topology map") Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent e9a6fb0 commit 3733912

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/firewire/core-card.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@ void fw_card_initialize(struct fw_card *card,
577577
INIT_LIST_HEAD(&card->transactions.list);
578578
spin_lock_init(&card->transactions.lock);
579579

580+
spin_lock_init(&card->topology_map.lock);
581+
580582
card->split_timeout.hi = DEFAULT_SPLIT_TIMEOUT / 8000;
581583
card->split_timeout.lo = (DEFAULT_SPLIT_TIMEOUT % 8000) << 19;
582584
card->split_timeout.cycles = DEFAULT_SPLIT_TIMEOUT;

0 commit comments

Comments
 (0)