Commit 8e485917 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Linus Torvalds
Browse files

Videopix Frame Grabber: Fix unreleased lock in vfc_debug()

Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails
Signed-off-by: default avatarMatthias Kaehlcke <>
Acked-by: default avatar"David S. Miller" <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 0af1a450
...@@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp) ...@@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
buffer,inout.len); buffer,inout.len);
if (copy_to_user(argp,&inout,sizeof(inout))) { if (copy_to_user(argp,&inout,sizeof(inout))) {
kfree(buffer); kfree(buffer);
return -EFAULT; return -EFAULT;
} }
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