Having the kernel memorize pids of running processes is ugly. Especially if
those processes are allowed to exit. So we don't introduce any lifetime issues
or any other weird uglyness and simply insist that the cad_pid is always
interpreted with respect to the initial process id namespace.
Signed-off-by: Eric W. Biederman <[email protected]>
---
drivers/parisc/power.c | 3 ++-
kernel/sys.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
f343da178ee420b5b35a7fa43cc7995f47024004
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 54b2b7f..fbf14d9 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -45,6 +45,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/workqueue.h>
+#include <linux/pspace.h>
#include <asm/pdc.h>
#include <asm/io.h>
@@ -86,7 +87,7 @@
static void deferred_poweroff(void *dummy)
{
extern int cad_pid; /* from kernel/sys.c */
- if (kill_proc(cad_pid, SIGINT, 1)) {
+ if (kill_proc(&init_pspace, cad_pid, SIGINT, 1)) {
/* just in case killing init process failed */
machine_power_off();
}
diff --git a/kernel/sys.c b/kernel/sys.c
index bd594c3..d9fcc0e 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -581,7 +581,7 @@ void ctrl_alt_del(void)
if (C_A_D)
schedule_work(&cad_work);
else
- kill_proc(cad_pid, SIGINT, 1);
+ kill_proc(&init_pspace, cad_pid, SIGINT, 1);
}
--
1.1.5.g3480
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]