projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'tegra-for-4.5-memory' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git]
/
fs
/
ncpfs
/
ioctl.c
diff --git
a/fs/ncpfs/ioctl.c
b/fs/ncpfs/ioctl.c
index
79b1130
..
0a3f9b5
100644
(file)
--- a/
fs/ncpfs/ioctl.c
+++ b/
fs/ncpfs/ioctl.c
@@
-525,6
+525,8
@@
static long __ncp_ioctl(struct inode *inode, unsigned int cmd, unsigned long arg
switch (rqdata.cmd) {
case NCP_LOCK_EX:
case NCP_LOCK_SH:
+ if (rqdata.timeout < 0)
+ return -EINVAL;
if (rqdata.timeout == 0)
rqdata.timeout = NCP_LOCK_DEFAULT_TIMEOUT;
else if (rqdata.timeout > NCP_LOCK_MAX_TIMEOUT)