summaryrefslogtreecommitdiffstats
path: root/sys/net/if_tap.c
diff options
context:
space:
mode:
authortruckman <truckman@FreeBSD.org>2002-10-03 02:13:00 +0000
committertruckman <truckman@FreeBSD.org>2002-10-03 02:13:00 +0000
commitda2757cbc5b4e67753f56890f45f5f687cc298ae (patch)
treea99f59036961904f8470031c60cd1319fed1c7b9 /sys/net/if_tap.c
parentd86ebf792e644b705a6451c5a934d6fa545b3086 (diff)
downloadFreeBSD-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/net/if_tap.c')
-rw-r--r--sys/net/if_tap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c
index 0d46639..5cdeaf7 100644
--- a/sys/net/if_tap.c
+++ b/sys/net/if_tap.c
@@ -709,7 +709,7 @@ tapioctl(dev, cmd, data, flag, td)
return (fsetown(*(int *)data, &tp->tap_sigio));
case FIOGETOWN:
- *(int *)data = fgetown(tp->tap_sigio);
+ *(int *)data = fgetown(&tp->tap_sigio);
return (0);
/* this is deprecated, FIOSETOWN should be used instead */
@@ -718,7 +718,7 @@ tapioctl(dev, cmd, data, flag, td)
/* this is deprecated, FIOGETOWN should be used instead */
case TIOCGPGRP:
- *(int *)data = -fgetown(tp->tap_sigio);
+ *(int *)data = -fgetown(&tp->tap_sigio);
return (0);
/* VMware/VMnet port ioctl's */
OpenPOWER on IntegriCloud