diff options
author | Stanislav Fomichev <kernel@fomichev.me> | 2011-02-05 23:13:01 +0000 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-10 15:04:55 -0500 |
commit | b9f810570d9cc13177128e11a74e22d37aa68a1a (patch) | |
tree | 91c120b297c357695ae4be5dcd373ce220d0dedd /fs/nfs | |
parent | a5e502681007779d4762fb3ef7e80a3ecd1cfe6b (diff) | |
download | kernel_samsung_aries-b9f810570d9cc13177128e11a74e22d37aa68a1a.zip kernel_samsung_aries-b9f810570d9cc13177128e11a74e22d37aa68a1a.tar.gz kernel_samsung_aries-b9f810570d9cc13177128e11a74e22d37aa68a1a.tar.bz2 |
nfs: add kmalloc return value check in decode_and_add_ds
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4filelayoutdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4filelayoutdev.c b/fs/nfs/nfs4filelayoutdev.c index f5c9b12..b73c343 100644 --- 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); |