All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] posix-cpu-timers: remove lockdep_assert_irqs_disabled()
@ 2018-05-04 15:25 Sebastian Andrzej Siewior
  2018-06-11 14:51 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-05-04 15:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: tglx, Frederic Weisbecker, Sebastian Andrzej Siewior

The lockdep_assert_irqs_disabled() was a BUG_ON() statement in the
beginning and it was added just before the "spin_lock(siglock)"
statement to ensure this lock was taken with disabled interrupts.
This is no longer the case: the siglock is acquired via
lock_task_sighand() and this function already disables the interrupts.
The lock is also acquired before this "lockdep_assert_irqs_disabled" so
it is beset to remove it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/time/posix-cpu-timers.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
index 2541bd89f20e..d4f54df9c9fa 100644
--- a/kernel/time/posix-cpu-timers.c
+++ b/kernel/time/posix-cpu-timers.c
@@ -604,7 +604,6 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
 	/*
 	 * Disarm any old timer after extracting its expiry time.
 	 */
-	lockdep_assert_irqs_disabled();
 
 	ret = 0;
 	old_incr = timer->it.cpu.incr;
@@ -1049,7 +1048,6 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
 	/*
 	 * Now re-arm for the new expiry time.
 	 */
-	lockdep_assert_irqs_disabled();
 	arm_timer(timer);
 unlock:
 	unlock_task_sighand(p, &flags);
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] posix-cpu-timers: remove lockdep_assert_irqs_disabled()
  2018-05-04 15:25 [PATCH] posix-cpu-timers: remove lockdep_assert_irqs_disabled() Sebastian Andrzej Siewior
@ 2018-06-11 14:51 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2018-06-11 14:51 UTC (permalink / raw)
  To: tglx, Frederic Weisbecker; +Cc: linux-kernel

On 2018-05-04 17:25:48 [+0200], To linux-kernel@vger.kernel.org wrote:
> The lockdep_assert_irqs_disabled() was a BUG_ON() statement in the
> beginning and it was added just before the "spin_lock(siglock)"
> statement to ensure this lock was taken with disabled interrupts.
> This is no longer the case: the siglock is acquired via
> lock_task_sighand() and this function already disables the interrupts.
> The lock is also acquired before this "lockdep_assert_irqs_disabled" so
> it is beset to remove it.

*ping*

> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  kernel/time/posix-cpu-timers.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c
> index 2541bd89f20e..d4f54df9c9fa 100644
> --- a/kernel/time/posix-cpu-timers.c
> +++ b/kernel/time/posix-cpu-timers.c
> @@ -604,7 +604,6 @@ static int posix_cpu_timer_set(struct k_itimer *timer, int timer_flags,
>  	/*
>  	 * Disarm any old timer after extracting its expiry time.
>  	 */
> -	lockdep_assert_irqs_disabled();
>  
>  	ret = 0;
>  	old_incr = timer->it.cpu.incr;
> @@ -1049,7 +1048,6 @@ static void posix_cpu_timer_rearm(struct k_itimer *timer)
>  	/*
>  	 * Now re-arm for the new expiry time.
>  	 */
> -	lockdep_assert_irqs_disabled();
>  	arm_timer(timer);
>  unlock:
>  	unlock_task_sighand(p, &flags);
> -- 
> 2.17.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-11 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-04 15:25 [PATCH] posix-cpu-timers: remove lockdep_assert_irqs_disabled() Sebastian Andrzej Siewior
2018-06-11 14:51 ` Sebastian Andrzej Siewior

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.