patch-2.1.106 linux/include/linux/poll.h

Next file: linux/include/linux/proc_fs.h
Previous file: linux/include/linux/pg.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.105/linux/include/linux/poll.h linux/include/linux/poll.h
@@ -79,8 +79,8 @@
 	if (ufdset) {
 		int error;
 		error = verify_area(VERIFY_WRITE, ufdset, nr);
-		if (!error)
-			error = __copy_from_user(fdset, ufdset, nr);
+		if (!error && __copy_from_user(fdset, ufdset, nr))
+			error = -EFAULT;
 		return error;
 	}
 	memset(fdset, 0, nr);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov