* [PATCH] 2.6.6 memory allocation checks in idmap_lookup()
@ 2004-06-06 16:15 Yury Umanets
0 siblings, 0 replies; only message in thread
From: Yury Umanets @ 2004-06-06 16:15 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-06-06 16:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-06 16:15 [PATCH] 2.6.6 memory allocation checks in idmap_lookup() Yury Umanets
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox