projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5e5026
)
nfs: add kmalloc return value check in decode_and_add_ds
author
Stanislav Fomichev
<kernel@fomichev.me>
Sat, 5 Feb 2011 23:13:01 +0000
(23:13 +0000)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 10 Mar 2011 20:04:55 +0000
(15:04 -0500)
add kmalloc return value check in decode_and_add_ds
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4filelayoutdev.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4filelayoutdev.c
b/fs/nfs/nfs4filelayoutdev.c
index
f5c9b12
..
b73c343
100644
(file)
--- a/
fs/nfs/nfs4filelayoutdev.c
+++ b/
fs/nfs/nfs4filelayoutdev.c
@@
-219,6
+219,10
@@
decode_and_add_ds(__be32 **pp, struct inode *inode)
goto out_err;
}
buf = kmalloc(rlen + 1, GFP_KERNEL);
+ if (!buf) {
+ dprintk("%s: Not enough memory\n", __func__);
+ goto out_err;
+ }
buf[rlen] = '\0';
memcpy(buf, r_addr, rlen);