From: Derrick Brashear Date: Wed, 10 Jul 2002 21:02:49 +0000 (+0000) Subject: STABLE12-linux-newvcache-make-sure-we-dont-try-to-iterate-null-pointer-20020615 X-Git-Tag: openafs-stable-1_2_6~47 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=cb841dd871d0d0937046c5b4bd75d0533da62201;p=packages%2Fo%2Fopenafs.git STABLE12-linux-newvcache-make-sure-we-dont-try-to-iterate-null-pointer-20020615 based on report from wilder@us.ibm.com not clear this is sufficient (cherry picked from commit 307543629ddeb4b4f34ff5947038fd6a224547b5) --- diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index 0ff7f54cb..45c538ff9 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -495,7 +495,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);