spin_lock(&p->files->file_lock); 
rcu_read_lock(); 
static void __do_SAK(void *arg){#ifdef TTY_SOFT_SAK	tty_hangup(tty);#else	struct tty_struct *tty = arg;	struct task_struct *p;	int session;	int		i;	struct file	*filp;	struct tty_ldisc *disc;	struct fdtable *fdt;		if (!tty)		return;	session  = tty->session;		/* We don't want an ldisc switch during this */	disc = tty_ldisc_ref(tty);	if (disc && disc->flush_buffer)		disc->flush_buffer(tty);	tty_ldisc_deref(disc);	if (tty->driver->flush_buffer)		tty->driver->flush_buffer(tty);		read_lock(&tasklist_lock);	do_each_task_pid(session, PIDTYPE_SID, p) {		if (p->signal->tty == tty || session > 0) {			printk(KERN_NOTICE "SAK: killed process %d"			    " (%s): p->signal->session==tty->session\n",			    p->pid, p->comm);			send_sig(SIGKILL, p, 1);			continue;		}		task_lock(p);		if (p->files) {			spin_lock(&p->files->file_lock);			fdt = files_fdtable(p->files);			for (i=0; i < fdt->max_fds; i++) {				filp = fcheck_files(p->files, i);				if (!filp)					continue;				if (filp->f_op->read == tty_read &&				    filp->private_data == tty) {					printk(KERN_NOTICE "SAK: killed process %d"					    " (%s): fd#%d opened to the tty\n",					    p->pid, p->comm, i);					send_sig(SIGKILL, p, 1);					break;				}			}			spin_unlock(&p->files->file_lock);		}		task_unlock(p);	} while_each_task_pid(session, PIDTYPE_SID, p);	read_unlock(&tasklist_lock);#endif}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b835996f628eadb55c5fb222ba46fe9395bf73c7/tty_io.c/buggy/drivers/char/tty_io.c