Commit ccb81d9c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] mpu401 usercopy fix

From: Dipankar Sarma <dipankar@in.ibm.com>

Use copy_to_user to copy mpu_synth_ioctl arg.
parent 25ed287b
...@@ -792,7 +792,10 @@ static int mpu_synth_ioctl(int dev, ...@@ -792,7 +792,10 @@ static int mpu_synth_ioctl(int dev,
{ {
case SNDCTL_SYNTH_INFO: 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; return 0;
case SNDCTL_SYNTH_MEMAVL: case SNDCTL_SYNTH_MEMAVL:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment