]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
redo locking of tty->pgrp
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Wed, 30 Apr 2008 07:53:30 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:40 +0000 (08:29 -0700)
commit47f86834bbd4193139d61d659bebf9ab9d691e37
tree6724b07e24929eba5c6df31f07871d9d6b4aa296
parent04f378b198da233ca0aca341b113dc6579d46123
redo locking of tty->pgrp

Historically tty->pgrp and friends were pid_t and the code "knew" they were
safe.  The change to pid structs opened up a few races and the removal of the
BKL in places made them quite hittable.  We put tty->pgrp under the ctrl_lock
for the tty.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/tty_io.c
drivers/char/vt.c
include/linux/tty.h