2.6.6 memory allocation checks in idmap_lookup()
PATCH 1/1 2.6.6 memory allocation checks in idmap_lookup()
Adds memory allocation checks in idmap_lookup()
./linux-2.6.6-modified/fs/nfsd/nfs4idmap.c | 2 ++ 1 files changed, 2 insertions(+)
Signed-off-by Yury Umanets <[email protected]>
diff -rupN ./linux-2.6.6/fs/nfsd/nfs4idmap.c./linux-2.6.6-modified/fs/nfsd/nfs4idmap.c
linux-2.6.6-modified/fs/nfsd/nfs4idmap.c renamed from linux-2.6.6/fs/nfsd/nfs4idmap.c +2 -0
@@ -474,6 +474,8 @@ idmap_lookup(struct svc_rqst *rqstp,if (!*item)return -ENOMEM ; mdr =kmalloc (sizeof (*mdr),GFP_KERNEL ); +if (!mdr) +return -ENOMEM ;memset (mdr,0 ,sizeof (*mdr));init_waitqueue_head (&mdr->waitq);add_wait_queue (&mdr->waitq, &waitq);
Signature · 1 line
umka