patch-2.1.121 linux/drivers/scsi/scsi_ioctl.c

Next file: linux/drivers/scsi/sr_ioctl.c
Previous file: linux/drivers/scsi/scsi_debug.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.120/linux/drivers/scsi/scsi_ioctl.c linux/drivers/scsi/scsi_ioctl.c
@@ -226,7 +226,9 @@
     if(buf_needed){
 	buf_needed = (buf_needed + 511) & ~511;
 	if (buf_needed > MAX_BUF) buf_needed = MAX_BUF;
+        spin_lock_irqsave(&io_request_lock, flags);
 	buf = (char *) scsi_malloc(buf_needed);
+        spin_unlock_irqrestore(&io_request_lock, flags);
 	if (!buf) return -ENOMEM;
 	memset(buf, 0, buf_needed);
     } else

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