fix NULL dereferencing in dcache.c
PATCH 1/1 fix NULL dereferencing in dcache.c
Unrelated to my first dcache patch, this is something more crucial and should be applied first.
fs/dcache.c:
- handle d_alloc() returning NULL.
fs/dcache.c +3 -0
@@ -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);
Signature · 2 lines
Dan Aloni [email protected]