projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16eac4b
)
ocfs2: punch hole should return EINVAL if the length argument in ioctl is negative
author
Tariq Saeed
<
[email protected]
>
Tue, 21 Jan 2014 23:48:38 +0000
(15:48 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 22 Jan 2014 00:19:42 +0000
(16:19 -0800)
An unreserve space ioctl OCFS2_IOC_UNRESVSP/64 should reject a negative
length.
Orabug:
14789508
Signed-off-by: Tariq Saseed <
[email protected]
>
Signed-off-by: Srinivas Eeda <
[email protected]
>
Cc: Joel Becker <
[email protected]
>
Cc: Mark Fasheh <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/ocfs2/file.c
patch
|
blob
|
history
diff --git
a/fs/ocfs2/file.c
b/fs/ocfs2/file.c
index 6fff128cad16164e0f10ca614db618e0af60768f..f42eecef64781ecac5af385adbb9a91b19f02e51 100644
(file)
--- a/
fs/ocfs2/file.c
+++ b/
fs/ocfs2/file.c
@@
-1869,7
+1869,8
@@
static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
}
size = sr->l_start + sr->l_len;
- if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64) {
+ if (cmd == OCFS2_IOC_RESVSP || cmd == OCFS2_IOC_RESVSP64 ||
+ cmd == OCFS2_IOC_UNRESVSP || cmd == OCFS2_IOC_UNRESVSP64) {
if (sr->l_len <= 0) {
ret = -EINVAL;
goto out_inode_unlock;