diff options
author | truckman <truckman@FreeBSD.org> | 2002-10-03 02:13:00 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2002-10-03 02:13:00 +0000 |
commit | da2757cbc5b4e67753f56890f45f5f687cc298ae (patch) | |
tree | a99f59036961904f8470031c60cd1319fed1c7b9 /sys/kern/tty.c | |
parent | d86ebf792e644b705a6451c5a934d6fa545b3086 (diff) | |
download | FreeBSD-src-da2757cbc5b4e67753f56890f45f5f687cc298ae.zip FreeBSD-src-da2757cbc5b4e67753f56890f45f5f687cc298ae.tar.gz |
In an SMP environment post-Giant it is no longer safe to blindly
dereference the struct sigio pointer without any locking. Change
fgetown() to take a reference to the pointer instead of a copy of the
pointer and call SIGIO_LOCK() before copying the pointer and
dereferencing it.
Reviewed by: rwatson
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 717b123..e749020 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -827,7 +827,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) case FIOGETOWN: if (tp->t_session != NULL && !isctty(p, tp)) return (ENOTTY); - *(int *)data = fgetown(tp->t_sigio); + *(int *)data = fgetown(&tp->t_sigio); break; case TIOCEXCL: /* set exclusive use of tty */ |