linux-newvcache-make-sure-we-dont-try-to-iterate-null-pointer-20020615
authorDerrick Brashear <shadow@dementia.org>
Sat, 15 Jun 2002 18:11:18 +0000 (18:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sat, 15 Jun 2002 18:11:18 +0000 (18:11 +0000)
based on report from wilder@us.ibm.com
not clear this is sufficient

src/afs/afs_vcache.c

index ea2bc8b..c97e9a9 100644 (file)
@@ -491,7 +491,7 @@ restart:
        repeat:
            next = this_parent->d_subdirs.next;
        resume:
-           while (next != &this_parent->d_subdirs) {
+           while (next && next != &this_parent->d_subdirs) {
                struct list_head *tmp = next;
                struct dentry *dchld = list_entry(tmp, struct dentry, d_child);