aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2012-07-13 13:35:36 -0400
committerBen Hutchings <ben@decadent.org.uk>2012-07-25 04:11:18 +0100
commit8f2c5a741019b7ed10643040fe72e6152ee16ed6 (patch)
treeb8a42d07a32221f73c5e1d3400280607a1f7e854 /fs
parent631a86fc5ceb30586f87e5fb9cb7827c8c10f570 (diff)
Remove easily user-triggerable BUG from generic_setlease
commit 8d657eb3b43861064d36241e88d9d61c709f33f0 upstream. 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/locks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 0d68f1f8179..6a64f154db0 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)
case F_WRLCK:
return generic_add_lease(filp, arg, flp);
default:
- BUG();
+ return -EINVAL;
}
}
EXPORT_SYMBOL(generic_setlease);