diff options
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -134,6 +134,8 @@ EXPORT_SYMBOL(setattr_prepare); */ int inode_newsize_ok(const struct inode *inode, loff_t offset) { + if (offset < 0) + return -EINVAL; if (inode->i_size < offset) { unsigned long limit; |