__do_SAK() simply wants to kill off processes using a given tty.
This converts it to use for_each_task_pid().


diff -urpN wli-2.5.51-bk1-2/drivers/char/tty_io.c wli-2.5.51-bk1-3/drivers/char/tty_io.c
--- wli-2.5.51-bk1-2/drivers/char/tty_io.c	2002-12-09 18:46:10.000000000 -0800
+++ wli-2.5.51-bk1-3/drivers/char/tty_io.c	2002-12-11 18:30:37.000000000 -0800
@@ -1842,6 +1842,8 @@ static void __do_SAK(void *arg)
 #else
 	struct tty_struct *tty = arg;
 	struct task_struct *p;
+	struct list_head *l;
+	struct pid *pid;
 	int session;
 	int		i;
 	struct file	*filp;
@@ -1854,9 +1856,8 @@ static void __do_SAK(void *arg)
 	if (tty->driver.flush_buffer)
 		tty->driver.flush_buffer(tty);
 	read_lock(&tasklist_lock);
-	for_each_process(p) {
-		if ((p->tty == tty) ||
-		    ((session > 0) && (p->session == session))) {
+	for_each_task_pid(session, PIDTYPE_SID, p, l, pid) {
+		if (p->tty == tty || session > 0) {
 			printk(KERN_NOTICE "SAK: killed process %d"
 			    " (%s): p->session==tty->session\n",
 			    p->pid, p->comm);