projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4717bed
)
[CIFS] add extra null attr check
author
Steve French
<sfrench@us.ibm.com>
Wed, 25 Feb 2009 14:19:56 +0000
(14:19 +0000)
committer
Steve French
<sfrench@us.ibm.com>
Thu, 12 Mar 2009 01:36:21 +0000
(
01:36
+0000)
Although attr == NULL can not happen, this makes cifs_set_file_info safer
in the future since it may not be obvious that the caller can not set
attr to NULL.
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/inode.c
patch
|
blob
|
history
diff --git
a/fs/cifs/inode.c
b/fs/cifs/inode.c
index 4690a360c85587ed85a76db68ab4c5afed4f998e..a8797cc60805e4b732a4f1557f8590f353073455 100644
(file)
--- a/
fs/cifs/inode.c
+++ b/
fs/cifs/inode.c
@@
-763,6
+763,9
@@
cifs_set_file_info(struct inode *inode, struct iattr *attrs, int xid,
struct cifsTconInfo *pTcon = cifs_sb->tcon;
FILE_BASIC_INFO info_buf;
+ if (attrs == NULL)
+ return -EINVAL;
+
if (attrs->ia_valid & ATTR_ATIME) {
set_time = true;
info_buf.LastAccessTime =