From: Greg Kroah-Hartman Date: Tue, 30 Jun 2015 00:38:27 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.10.83~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6cc381575ce7f823404371785c2025b0504644f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: d_walk-might-skip-too-much.patch --- diff --git a/queue-3.10/d_walk-might-skip-too-much.patch b/queue-3.10/d_walk-might-skip-too-much.patch new file mode 100644 index 00000000000..3118cf3fffb --- /dev/null +++ b/queue-3.10/d_walk-might-skip-too-much.patch @@ -0,0 +1,69 @@ +From Jari Ruusu +Date: Sat, 13 Jun 2015 19:01:31 +0300 +Subject: Re: [PATCH 3.10 14/46] d_walk() might skip too much +From: Jari Ruusu + +From: Jari Ruusu + +When Al Viro's VFS deadlock fix "deal with deadlock in d_walk()" was +backported to 3.10.y 3.4.y and 3.2.y stable kernel brances, the deadlock fix +was copied to 3 different places. Later, a bug in that code was discovered. +Al Viro's fix involved fixing only one part of code in mainline kernel. That +fix is called "d_walk() might skip too much". + +3.10.y 3.4.y and 3.2.y stable kernel brances need that later fix copied to 3 +different places. Greg Kroah-Hartman included Al Viro's "d_walk() might skip +too much" fix only once in 3.10.80 kernel, leaving 2 more places without a +fix. + +The patch below was not written by me. I only applied Al Viro's "d_walk() +might skip too much" fix 2 more times to 3.10.80 kernel, and cheched that +the fixes went to correct places. With this patch applied, all 3 places that +I am aware of 3.10.y stable branch are now fixed. + +Signed-off-by: Jari Ruusu +Cc: Willy Tarreau +Signed-off-by: Greg Kroah-Hartman + +--- + fs/dcache.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +--- a/fs/dcache.c ++++ b/fs/dcache.c +@@ -1053,13 +1053,13 @@ ascend: + /* might go back up the wrong parent if we have had a rename. */ + if (!locked && read_seqretry(&rename_lock, seq)) + goto rename_retry; +- next = child->d_child.next; +- while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) { ++ /* go into the first sibling still alive */ ++ do { ++ next = child->d_child.next; + if (next == &this_parent->d_subdirs) + goto ascend; + child = list_entry(next, struct dentry, d_child); +- next = next->next; +- } ++ } while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)); + rcu_read_unlock(); + goto resume; + } +@@ -2977,13 +2977,13 @@ ascend: + /* might go back up the wrong parent if we have had a rename. */ + if (!locked && read_seqretry(&rename_lock, seq)) + goto rename_retry; +- next = child->d_child.next; +- while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) { ++ /* go into the first sibling still alive */ ++ do { ++ next = child->d_child.next; + if (next == &this_parent->d_subdirs) + goto ascend; + child = list_entry(next, struct dentry, d_child); +- next = next->next; +- } ++ } while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)); + rcu_read_unlock(); + goto resume; + } diff --git a/queue-3.10/series b/queue-3.10/series index f34f2ec2229..502e6704651 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -16,3 +16,4 @@ btrfs-make-xattr-replace-operations-atomic.patch xfrm-increase-the-garbage-collector-threshold.patch ipv6-prevent-fib6_run_gc-contention.patch ipv6-update-ip6_rt_last_gc-every-time-gc-is-run.patch +d_walk-might-skip-too-much.patch