mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
[SPARC] 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: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e5071b5493
commit
2fa3195d72
1 changed files with 1 additions and 0 deletions
|
@ -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))) {
|
||||||
|
vfc_unlock_device(dev);
|
||||||
kfree(buffer);
|
kfree(buffer);
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue