patch-1.3.60 linux/drivers/char/tpqic02.c

Next file: linux/drivers/char/wdt.c
Previous file: linux/drivers/char/softdog.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.59/linux/drivers/char/tpqic02.c linux/drivers/char/tpqic02.c
@@ -2585,7 +2585,8 @@
 	if (c == DDIOCSDBG) {
 		if (!suser())
 			return -EPERM;
-		verify_area(VERIFY_READ, (int *) ioarg, sizeof(int));
+		error = verify_area(VERIFY_READ, (int *) ioarg, sizeof(int));
+		if (error) return error;
 		c = get_user_long((int *) ioarg);
 		if (c==0) {
 			QIC02_TAPE_DEBUG = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this