Re: [PATCH] Slightly safer Magic SysRq attempt2

James Manning (jmm@raleigh.ibm.com)
Mon, 25 Oct 1999 22:37:58 -0400


--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii

[ Monday, October 25, 1999 ] Ed Grimm wrote:
> Ok, if a wart it be, then maybe you'd prefer an elimination of 7 lines
> of wart and 3 lines documenting wart? These patches remove the
> offending option utterly.

Since the param has no use now, we can kill even_init too :)

James

-- 
Miscellaneous Engineer --- IBM Netfinity Performance Development

--6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="even_init.patch"

--- linux-2.3.23-sysrq/drivers/char/sysrq.c Mon Oct 25 22:24:09 1999 +++ linux-2.3.23/drivers/char/sysrq.c Mon Oct 25 22:33:33 1999 @@ -35,12 +35,12 @@ /* Send a signal to all user processes */ -static void send_sig_all(int sig, int even_init) +static void send_sig_all(int sig) { struct task_struct *p; for_each_task(p) { - if (p->mm) { /* Not swapper nor kernel thread */ + if (p->mm) { /* Not swapper nor kernel thread */ force_sig(sig, p); } } @@ -115,12 +115,12 @@ break; case 'e': /* E -- terminate all user processes */ printk("Terminate All Tasks\n"); - send_sig_all(SIGTERM, 0); + send_sig_all(SIGTERM); orig_log_level = 8; /* We probably have killed syslogd */ break; case 'i': /* I -- kill all user processes */ printk("Kill All Tasks\n"); - send_sig_all(SIGKILL, 0); + send_sig_all(SIGKILL); orig_log_level = 8; break; default: /* Unknown: help */

--6TrnltStXW4iwmi0--

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