lkml.org 
[lkml]   [2002]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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.

--- 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
-
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 13:22    [W:0.032 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site