summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French2009-02-25 15:19:56 +0100
committerSteve French2009-03-12 02:36:21 +0100
commit1adcb71092f6461c4002ccf29d316f6da3e1f39b (patch)
treebc2238c4e473542f0b18bec7433f92d58d53b216 /fs
parent[CIFS] fix build error (diff)
downloadkernel-qcow2-linux-1adcb71092f6461c4002ccf29d316f6da3e1f39b.tar.gz
kernel-qcow2-linux-1adcb71092f6461c4002ccf29d316f6da3e1f39b.tar.xz
kernel-qcow2-linux-1adcb71092f6461c4002ccf29d316f6da3e1f39b.zip
[CIFS] add extra null attr check
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 4690a360c855..a8797cc60805 100644
--- 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 =