aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-08-05 15:13:49 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-08-05 15:13:49 +0000
commit4e01f8427e1a5f50803770bcaad8ed480ee30711 (patch)
treee7b3faa21c61f45a9442cdc16025ac778d047b20
parent907d3e5c3a57d8a919dd614274b7fef9dd3151bd (diff)
downloadsrc-4e01f8427e1a5f50803770bcaad8ed480ee30711.tar.gz
src-4e01f8427e1a5f50803770bcaad8ed480ee30711.zip
MFS: check far end of pipe.
Notes
Notes: svn path=/releng/4.4/; revision=101384
-rw-r--r--UPDATING4
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/kern/sys_pipe.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/UPDATING b/UPDATING
index e590e1ef136f..3cafae418140 100644
--- a/UPDATING
+++ b/UPDATING
@@ -17,6 +17,10 @@ minimal number of processes, if possible, for that patch. For those
updates that don't have an advisory, or to be safe, you can do a full
build and install as described in the COMMON ITEMS section.
+20020805: p24 FreeBSD-SA-02:37.kqueue
+ Registering an EVFILT_WRITE event on a pipe whose far end had
+ already been closed would cause a kernel panic.
+
20020801: p23 FreeBSD-SA-02:36.nfs
RPCs with zero-length payload would cause an infinite loop.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index aecc62e01bde..671c56c7f402 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -36,7 +36,7 @@
TYPE="FreeBSD"
REVISION="4.4"
-BRANCH="RELEASE-p23"
+BRANCH="RELEASE-p24"
RELEASE="${REVISION}-${BRANCH}"
VERSION="${TYPE} ${RELEASE}"
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index be38a936453a..b5897393a0dc 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1235,6 +1235,9 @@ pipe_kqfilter(struct file *fp, struct knote *kn)
case EVFILT_WRITE:
kn->kn_fop = &pipe_wfiltops;
cpipe = cpipe->pipe_peer;
+ if (cpipe == NULL)
+ /* other end of pipe has been closed */
+ return (EBADF);
break;
default:
return (1);