Push BKL down to the (few) routines that actually need it,
remove it from the do_exit() path.
struct task_struct *p;
int tty_pgrp = -1;
+ lock_kernel();
+
if (tty) {
tty_pgrp = tty->pgrp;
if (on_exit && tty->driver.type != TTY_DRIVER_TYPE_PTY)
kill_pg(current->tty_old_pgrp, SIGHUP, on_exit);
kill_pg(current->tty_old_pgrp, SIGCONT, on_exit);
}
+ unlock_kernel();
return;
}
if (tty_pgrp > 0) {
if (p->session == current->session)
p->tty = NULL;
read_unlock(&tasklist_lock);
+ unlock_kernel();
}
void stop_tty(struct tty_struct *tty)
struct sem_array *sma;
int nsems, i;
+ lock_kernel();
+
/* If the current process was sleeping for a semaphore,
* remove it from the queue.
*/
sem_unlock(semid);
}
current->semundo = NULL;
+
+ unlock_kernel();
}
#ifdef CONFIG_PROC_FS
acct_process(code);
__exit_mm(tsk);
- lock_kernel();
sem_exit();
__exit_files(tsk);
__exit_fs(tsk);