* [PATCH] fix NULL dereferencing in dcache.c
@ 2002-05-31 16:32 Dan Aloni
0 siblings, 0 replies; only message in thread
From: Dan Aloni @ 2002-05-31 16:32 UTC (permalink / raw)
To: linux-kernel; +Cc: trivial
Unrelated to my first dcache patch, this is something more crucial
and should be applied first.
fs/dcache.c:
- handle d_alloc() returning NULL.
--- linux-2.5.19/fs/dcache.c Thu May 30 22:35:37 2002
+++ linux-2.5.19/fs/dcache.c Fri May 31 19:19:18 2002
@@ -755,6 +755,9 @@
}
tmp = d_alloc(NULL, &(const struct qstr) {"",0,0});
+ if (!tmp)
+ return NULL;
+
tmp->d_parent = tmp; /* make sure dput doesn't croak */
spin_lock(&dcache_lock);
--
Dan Aloni
da-x@gmx.net
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-31 16:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-31 16:32 [PATCH] fix NULL dereferencing in dcache.c Dan Aloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®