All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Xenomai-core@domain.hid
Subject: [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event
Date: Fri, 09 May 2008 11:19:49 +0200	[thread overview]
Message-ID: <48241735.1050400@domain.hid> (raw)

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


             reply	other threads:[~2008-05-09  9:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09  9:19 Jan Kiszka [this message]
2008-05-09  9:30 ` [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event Philippe Gerum
2008-05-09  9:41   ` Jan Kiszka
2008-05-09  9:53     ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48241735.1050400@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=Xenomai-core@domain.hid \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.