lkml.org 
[lkml]   [2004]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] 2.6.6 memory allocation checks in idmap_lookup()
From
Date
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 <torque@ukrpost.net>

diff -rupN ./linux-2.6.6/fs/nfsd/nfs4idmap.c
./linux-2.6.6-modified/fs/nfsd/nfs4idmap.c
--- ./linux-2.6.6/fs/nfsd/nfs4idmap.c Mon May 10 05:32:54 2004
+++ ./linux-2.6.6-modified/fs/nfsd/nfs4idmap.c Wed Jun 2 14:40:17 2004
@@ -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);

--
umka

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.015 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site