* [PATCH] target: fix warning on realtime kernels
@ 2021-05-31 12:13 Maurizio Lombardi
2021-05-31 21:11 ` Bart Van Assche
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2021-05-31 12:13 UTC (permalink / raw)
To: bvanassche; +Cc: michael.christie, target-devel, martin.petersen
On realtime kernels, spin_lock_irq*(spinlock_t) do not
disable the interrupts, a call to irqs_disabled()
will return false thus firing a warning in __transport_wait_for_tasks()
This patch removes the warning and also replaces assert_spin_locked
with lockdep_assert_held()
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
drivers/target/target_core_transport.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 8fbfe75c5744..09526e6bc0bb 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3121,9 +3121,7 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
__releases(&cmd->t_state_lock)
__acquires(&cmd->t_state_lock)
{
-
- assert_spin_locked(&cmd->t_state_lock);
- WARN_ON_ONCE(!irqs_disabled());
+ lockdep_assert_held(&cmd->t_state_lock);
if (fabric_stop)
cmd->transport_state |= CMD_T_FABRIC_STOP;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] target: fix warning on realtime kernels
2021-05-31 12:13 [PATCH] target: fix warning on realtime kernels Maurizio Lombardi
@ 2021-05-31 21:11 ` Bart Van Assche
2021-06-02 5:45 ` Martin K. Petersen
2021-06-03 18:05 ` Chaitanya Kulkarni
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2021-05-31 21:11 UTC (permalink / raw)
To: Maurizio Lombardi; +Cc: michael.christie, target-devel, martin.petersen
On 5/31/21 5:13 AM, Maurizio Lombardi wrote:
> On realtime kernels, spin_lock_irq*(spinlock_t) do not
> disable the interrupts, a call to irqs_disabled()
> will return false thus firing a warning in __transport_wait_for_tasks()
>
> This patch removes the warning and also replaces assert_spin_locked
> with lockdep_assert_held()
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target: fix warning on realtime kernels
2021-05-31 12:13 [PATCH] target: fix warning on realtime kernels Maurizio Lombardi
2021-05-31 21:11 ` Bart Van Assche
@ 2021-06-02 5:45 ` Martin K. Petersen
2021-06-03 18:05 ` Chaitanya Kulkarni
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2021-06-02 5:45 UTC (permalink / raw)
To: bvanassche, Maurizio Lombardi
Cc: Martin K . Petersen, michael.christie, target-devel
On Mon, 31 May 2021 14:13:26 +0200, Maurizio Lombardi wrote:
> On realtime kernels, spin_lock_irq*(spinlock_t) do not
> disable the interrupts, a call to irqs_disabled()
> will return false thus firing a warning in __transport_wait_for_tasks()
>
> This patch removes the warning and also replaces assert_spin_locked
> with lockdep_assert_held()
Applied to 5.13/scsi-fixes, thanks!
[1/1] target: fix warning on realtime kernels
https://git.kernel.org/mkp/scsi/c/515da6f4295c
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target: fix warning on realtime kernels
2021-05-31 12:13 [PATCH] target: fix warning on realtime kernels Maurizio Lombardi
2021-05-31 21:11 ` Bart Van Assche
2021-06-02 5:45 ` Martin K. Petersen
@ 2021-06-03 18:05 ` Chaitanya Kulkarni
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-06-03 18:05 UTC (permalink / raw)
To: Maurizio Lombardi
Cc: bvanassche, michael.christie, target-devel, martin.petersen
On 5/31/21 05:13, Maurizio Lombardi wrote:
> On realtime kernels, spin_lock_irq*(spinlock_t) do not
> disable the interrupts, a call to irqs_disabled()
> will return false thus firing a warning in __transport_wait_for_tasks()
>
> This patch removes the warning and also replaces assert_spin_locked
> with lockdep_assert_held()
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-03 18:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-31 12:13 [PATCH] target: fix warning on realtime kernels Maurizio Lombardi
2021-05-31 21:11 ` Bart Van Assche
2021-06-02 5:45 ` Martin K. Petersen
2021-06-03 18:05 ` Chaitanya Kulkarni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.