mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-10-26 10:57:38 +08:00
firewire: core: adjust context_unsafe() usage for lockdep checks
schedule_error_callback() requires a lock to be held by the caller. However, __fw_send_request() calls the function without holding any lock when retrieving the transaction label fails, as no lock is needed in this case. context_safe() is used to suppress the precondition check in compiler-based context analysis, but it does not affect lockdep checks. As a result, lockdep reports a violation of the precondition. Acquire the lock before calling the function instead of using context_unsafe(). Link: https://lore.kernel.org/r/20261019122555.328060-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
1 parent
7d1e256fa1
commit
3e3858e479
1 file changed
+2
-1
@@ -438,7 +438,8 @@ __must_not_hold(&card->transactions.lock)
|
||||
tstamp = cycle_time_to_ohci_tstamp(curr_cycle_time);
|
||||
|
||||
t->packet.timestamp = tstamp;
|
||||
context_unsafe(schedule_error_callback(card, t, RCODE_SEND_ERROR, tstamp));
|
||||
scoped_guard(spinlock_irqsave, &card->transactions.lock)
|
||||
schedule_error_callback(card, t, RCODE_SEND_ERROR, tstamp);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user