From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <482419AC.1060706@domain.hid> Date: Fri, 09 May 2008 11:30:20 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <48241735.1050400@domain.hid> In-Reply-To: <48241735.1050400@domain.hid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: Philippe Gerum Subject: Re: [Xenomai-core] [PATCH] avoid deadlock-prone sighand_lock in do_schedule_event Reply-To: rpm@xenomai.org List-Id: "Xenomai life and development \(bug reports, patches, discussions\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Xenomai-core@domain.hid 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.