From: Matthias Kaehlcke Date: Tue, 31 Jul 2007 08:37:24 +0000 (-0700) Subject: [SPARC] Videopix Frame Grabber: Fix unreleased lock in vfc_debug() X-Git-Tag: v2.6.23-rc2~36^2~3 X-Git-Url: http://ftp.safe.ca/?a=commitdiff_plain;h=2fa3195d72f7d0cfb4dcb2b0dfa265ed0fa5cfa3;p=safe%2Fjmp%2Flinux-2.6 [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 Signed-off-by: Andrew Morton Signed-off-by: David S. Miller --- diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c index 26b1d2a..9269f7f 100644 --- a/drivers/sbus/char/vfc_dev.c +++ b/drivers/sbus/char/vfc_dev.c @@ -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; }