Skip to contentSkip to conversation

nucleus: Fix relaxed owner check

PATCH Applied Jan Kiszka 2 participants 2 messages Jan 19, 2012 – Jan 22, 2012

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 nucleus: Fix relaxed owner check

Fix a logic inversion introduced by b75cec1938. This both allows the relaxed-owner check to work again and prevents that we enter an endless signal storm if XNSWREP happens to be set already at this point (as seen in the field).

---
 ksrc/nucleus/synch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
ksrc/nucleus/synch.c +1 -1
index 47bc0c5..8daf7f6 100644
@@ -1004,7 +1004,7 @@ EXPORT_SYMBOL_GPL(xnsynch_release_all_ownerships);
 void xnsynch_detect_relaxed_owner(struct xnsynch *synch, struct xnthread *sleeper)
 {
 	if (xnthread_test_state(sleeper, XNTRAPSW) &&
-	    xnthread_test_info(sleeper, XNSWREP) &&
+	    !xnthread_test_info(sleeper, XNSWREP) &&
 	    xnthread_test_state(synch->owner, XNRELAX)) {
 		xnthread_set_info(sleeper, XNSWREP);
 		xnshadow_send_sig(sleeper, SIGDEBUG,
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 4 lines · Jan Kiszka

Fix a logic inversion introduced by b75cec1938. This both allows the relaxed-owner check to work again and prevents that we enter an endless signal storm if XNSWREP happens to be set already at this point (as seen in the field).

Applied, thanks.

Signature · 1 line
                                                                Gilles.