Skip to content

Commit

Permalink
[SPARC] Videopix Frame Grabber: Fix unreleased lock in vfc_debug()
Browse files Browse the repository at this point in the history
Videopix Frame Grabber: vfc_debug() doesn't release the device lock
when copy_from_user() fails

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matthias Kaehlcke authored and David S. Miller committed Jul 31, 2007
1 parent e5071b5 commit 2fa3195
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/sbus/char/vfc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ static int vfc_debug(struct vfc_dev *dev, int cmd, void __user *argp)
buffer,inout.len);

if (copy_to_user(argp,&inout,sizeof(inout))) {
vfc_unlock_device(dev);
kfree(buffer);
return -EFAULT;
}
Expand Down

0 comments on commit 2fa3195

Please sign in to comment.