patch-2.4.20 linux-2.4.20/drivers/s390/block/dasd.c

Next file: linux-2.4.20/drivers/s390/char/hwc.h
Previous file: linux-2.4.20/drivers/pnp/isapnp_proc.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/s390/block/dasd.c linux-2.4.20/drivers/s390/block/dasd.c
@@ -4055,7 +4055,12 @@
 dasd_statistics_write (struct file *file, const char *user_buf,
 		       size_t user_len, loff_t * offset)
 {
-	char *buffer = vmalloc (user_len);
+	char *buffer;
+	
+	if(user_len > 65536)
+		user_len = 65536;
+		
+	buffer = vmalloc (user_len);
 
 	if (buffer == NULL)
 		return -ENOMEM;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)