lkml.org 
[lkml]   [2002]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] s/preempt_count()/in_atomic() in do_exit()
From
Date
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

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());
\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.040 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site