lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <10672.1274379460@localhost>
Date:	Thu, 20 May 2010 14:17:40 -0400
From:	Valdis.Kletnieks@...edu
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
cc:	linux-kernel@...r.kernel.org
Subject: [2.6.34 PATCH] kernel: fix exit message for dead process

If a process is exiting with a non-zero preempt_count, it's in fact almost
certainly going to fail to do so because it is exiting due to a BUG or OOPS
while it held a lock, at which point it will never actually exit.  So change
the message to say it attempted to do so, rather than implying it succeeded.
Problem spotted when a process BUG'ed, the kernel reported the 'exited' status,
and then proceeded to BUG twice more dealing with the now-zombied process:

> [   35.357018] note: keymap[2481] exited with preempt_count 1
> [   35.360503] BUG: scheduling while atomic: keymap/2481/0x10000002

Yes, one line is 83 characters. It's still more readable than a split printk.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@...edu>

--- linux-2.6.34-mmotm0519/kernel/exit.c.dist	2010-05-20 10:59:11.646870592 -0400
+++ linux-2.6.34-mmotm0519/kernel/exit.c	2010-05-20 14:05:16.068800223 -0400
@@ -936,7 +936,7 @@ NORET_TYPE void do_exit(long code)
 	raw_spin_unlock_wait(&tsk->pi_lock);
 
 	if (unlikely(in_atomic()))
-		printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
+		printk(KERN_INFO "note: %s[%d] tried to exit with preempt_count %d\n",
 				current->comm, task_pid_nr(current),
 				preempt_count());
 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ