[PATCH] s/preempt_count()/in_atomic() in do_exit()

Robert Love (rml@tech9.net)
24 Sep 2002 16:50:54 -0400


--=-oC8+S5VnVDB7YE7Zm9iS
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Linus,

This patch converts the debugging check in do_exit from a check on
preempt_count() to in_atomic().

The main benefit to this is we will stop warning over the BKL and now
use the standard mechanism for such checks.

Patch is against current BK, please apply.

Robert Love

--=-oC8+S5VnVDB7YE7Zm9iS
Content-Disposition: attachment; filename=do_exit-in_atomic-rml-2.5.38-1.patch
Content-Type: text/x-patch; name=do_exit-in_atomic-rml-2.5.38-1.patch; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

diff -urN linux-2.5.38/kernel/exit.c linux/kernel/exit.c
--- linux-2.5.38/kernel/exit.c Tue Sep 24 16:14:44 2002
+++ linux/kernel/exit.c Tue Sep 24 16:34:27 2002
@@ -626,7 +626,7 @@
tsk->flags |= PF_EXITING;
del_timer_sync(&tsk->real_timer);

- if (unlikely(preempt_count()))
+ if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, current->pid,
preempt_count());

--=-oC8+S5VnVDB7YE7Zm9iS--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/