patch-2.4.21 linux-2.4.21/drivers/sound/mpu401.c

Next file: linux-2.4.21/drivers/sound/nec_vrc5477.c
Previous file: linux-2.4.21/drivers/sound/midibuf.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/sound/mpu401.c linux-2.4.21/drivers/sound/mpu401.c
@@ -791,7 +791,8 @@
 	{
 
 		case SNDCTL_SYNTH_INFO:
-			memcpy((&((char *) arg)[0]), (char *) &mpu_synth_info[midi_dev], sizeof(struct synth_info));
+			if(copy_to_user((&((char *) arg)[0]), (char *) &mpu_synth_info[midi_dev], sizeof(struct synth_info)))
+				return -EFAULT;
 			return 0;
 
 		case SNDCTL_SYNTH_MEMAVL:
@@ -1766,8 +1767,8 @@
 
 static struct address_info cfg;
 
-static int __initdata io = -1;
-static int __initdata irq = -1;
+static int io = -1;
+static int irq = -1;
 
 MODULE_PARM(irq, "i");
 MODULE_PARM(io, "i");

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