From 295cfaf9d717556dba9ff7cfa0c6e84b01b61f10 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Sat, 14 Jan 2006 19:57:48 +0000 Subject: MFC revision 1.185 date: 2005/12/16 18:32:39; author: delphij; state: Exp; lines: +2 -0 In pipe_write(): when uiomove() fails, do not spin on it forever. Submitted by: Kostik Belousov on -current@ Message-ID: <20051216151016.GE84442@deviant.zoral.local> Security: Local DoS --- sys/kern/sys_pipe.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/kern/sys_pipe.c') diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index d79a3198bd23..a237d979408e 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1176,6 +1176,8 @@ pipe_write(fp, uio, active_cred, flags, td) ("Pipe buffer overflow")); } pipeunlock(wpipe); + if (error != 0) + break; } else { /* * If the "read-side" has been blocked, wake it up now. -- cgit v1.2.3