From 3e3858e479a8fc0c78afb7da8ff65ed053f8ddce Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Mon, 19 Oct 2026 21:25:54 +0900 Subject: [PATCH] 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 --- drivers/firewire/core-transaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c index e24fb6b97770..0ebe70a4d440 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -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; }