aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2012-07-13 13:35:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-13 13:50:23 -0400
commit8d657eb3b43861064d36241e88d9d61c709f33f0 (patch)
tree4f50a3fbb59cc9a794092c1f549b6bbc6510ce74 /fs/locks.c
parent39ea32ca7e425cde24df04f34bf76746ea028681 (diff)
Remove easily user-triggerable BUG from generic_setlease
This can be trivially triggered from userspace by passing in something unexpected. kernel BUG at fs/locks.c:1468! invalid opcode: 0000 [#1] SMP RIP: 0010:generic_setlease+0xc2/0x100 Call Trace: __vfs_setlease+0x35/0x40 fcntl_setlease+0x76/0x150 sys_fcntl+0x1c6/0x810 system_call_fastpath+0x1a/0x1f Signed-off-by: Dave Jones <davej@redhat.com> Cc: stable@kernel.org # 3.2+ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 814c51d0de47..fce6238d52c1 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1465,7 +1465,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
1465 case F_WRLCK: 1465 case F_WRLCK:
1466 return generic_add_lease(filp, arg, flp); 1466 return generic_add_lease(filp, arg, flp);
1467 default: 1467 default:
1468 BUG(); 1468 return -EINVAL;
1469 } 1469 }
1470} 1470}
1471EXPORT_SYMBOL(generic_setlease); 1471EXPORT_SYMBOL(generic_setlease);