All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event
@ 2008-05-09  9:19 Jan Kiszka
  2008-05-09  9:30 ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2008-05-09  9:19 UTC (permalink / raw)
  To: Xenomai-core

This has been posted earlier already: Fix deadlocks when debugging
Xenomai applications via gdb by removing any attempt to acquire
sighand_lock (while holding rq_lock). This patch also cleans up the now
unused lock wrapper.

Unless someone complains, I'm going to merge this later today into trunk
and 2.4.x.

Jan

---
 include/asm-generic/wrappers.h |    1 -
 ksrc/nucleus/shadow.c          |    2 --
 2 files changed, 3 deletions(-)

Index: b/include/asm-generic/wrappers.h
===================================================================
--- a/include/asm-generic/wrappers.h
+++ b/include/asm-generic/wrappers.h
@@ -95,7 +95,6 @@ unsigned long __va_to_kva(unsigned long 
 #define PF_NOFREEZE 0
 
 /* Signals */
-#define wrap_sighand_lock(p)     ((p)->sigmask_lock)
 #define wrap_get_sigpending(m,p) sigandsets(m, \
 					    &(p)->pending.signal, \
 					    &(p)->pending.signal)
Index: b/ksrc/nucleus/shadow.c
===================================================================
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2194,9 +2194,7 @@ static inline void do_schedule_event(str
 			if (signal_pending(next)) {
 				sigset_t pending;
 
-				spin_lock(&wrap_sighand_lock(next));	/* Already interrupt-safe. */
 				wrap_get_sigpending(&pending, next);
-				spin_unlock(&wrap_sighand_lock(next));
 
 				if (sigismember(&pending, SIGSTOP) ||
 				    sigismember(&pending, SIGINT))

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event
  2008-05-09  9:19 [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event Jan Kiszka
@ 2008-05-09  9:30 ` Philippe Gerum
  2008-05-09  9:41   ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2008-05-09  9:30 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Xenomai-core

Jan Kiszka wrote:
> This has been posted earlier already: Fix deadlocks when debugging
> Xenomai applications via gdb by removing any attempt to acquire
> sighand_lock (while holding rq_lock). This patch also cleans up the now
> unused lock wrapper.
> 
> Unless someone complains, I'm going to merge this later today into trunk
> and 2.4.x.
>

It's already in.

> Jan
> 
> ---
>  include/asm-generic/wrappers.h |    1 -
>  ksrc/nucleus/shadow.c          |    2 --
>  2 files changed, 3 deletions(-)
> 
> Index: b/include/asm-generic/wrappers.h
> ===================================================================
> --- a/include/asm-generic/wrappers.h
> +++ b/include/asm-generic/wrappers.h
> @@ -95,7 +95,6 @@ unsigned long __va_to_kva(unsigned long 
>  #define PF_NOFREEZE 0
>  
>  /* Signals */
> -#define wrap_sighand_lock(p)     ((p)->sigmask_lock)
>  #define wrap_get_sigpending(m,p) sigandsets(m, \
>  					    &(p)->pending.signal, \
>  					    &(p)->pending.signal)
> Index: b/ksrc/nucleus/shadow.c
> ===================================================================
> --- a/ksrc/nucleus/shadow.c
> +++ b/ksrc/nucleus/shadow.c
> @@ -2194,9 +2194,7 @@ static inline void do_schedule_event(str
>  			if (signal_pending(next)) {
>  				sigset_t pending;
>  
> -				spin_lock(&wrap_sighand_lock(next));	/* Already interrupt-safe. */
>  				wrap_get_sigpending(&pending, next);
> -				spin_unlock(&wrap_sighand_lock(next));
>  
>  				if (sigismember(&pending, SIGSTOP) ||
>  				    sigismember(&pending, SIGINT))
> 


-- 
Philippe.


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

* Re: [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event
  2008-05-09  9:30 ` Philippe Gerum
@ 2008-05-09  9:41   ` Jan Kiszka
  2008-05-09  9:53     ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2008-05-09  9:41 UTC (permalink / raw)
  To: rpm; +Cc: Xenomai-core

Philippe Gerum wrote:
> Jan Kiszka wrote:
>> This has been posted earlier already: Fix deadlocks when debugging
>> Xenomai applications via gdb by removing any attempt to acquire
>> sighand_lock (while holding rq_lock). This patch also cleans up the now
>> unused lock wrapper.
>>
>> Unless someone complains, I'm going to merge this later today into trunk
>> and 2.4.x.
>>
> 
> It's already in.

Indeed, missed it. May I remove the wrapper?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


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

* Re: [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event
  2008-05-09  9:41   ` Jan Kiszka
@ 2008-05-09  9:53     ` Philippe Gerum
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2008-05-09  9:53 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Xenomai-core

Jan Kiszka wrote:
> Philippe Gerum wrote:
>> Jan Kiszka wrote:
>>> This has been posted earlier already: Fix deadlocks when debugging
>>> Xenomai applications via gdb by removing any attempt to acquire
>>> sighand_lock (while holding rq_lock). This patch also cleans up the now
>>> unused lock wrapper.
>>>
>>> Unless someone complains, I'm going to merge this later today into trunk
>>> and 2.4.x.
>>>
>> It's already in.
> 
> Indeed, missed it. May I remove the wrapper?
>

Would be nice, yes.

-- 
Philippe.


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

end of thread, other threads:[~2008-05-09  9:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09  9:19 [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event Jan Kiszka
2008-05-09  9:30 ` Philippe Gerum
2008-05-09  9:41   ` Jan Kiszka
2008-05-09  9:53     ` Philippe Gerum

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.