Al Viro 3d56c25e3b fix d_walk()/non-delayed __d_free() race
Ascend-to-parent logics in d_walk() depends on all encountered child
dentries not getting freed without an RCU delay.  Unfortunately, in
quite a few cases it is not true, with hard-to-hit oopsable race as
the result.

Fortunately, the fix is simiple; right now the rule is "if it ever
been hashed, freeing must be delayed" and changing it to "if it
ever had a parent, freeing must be delayed" closes that hole and
covers all cases the old rule used to cover.  Moreover, pipes and
sockets remain _not_ covered, so we do not introduce RCU delay in
the cases which are the reason for having that delay conditional
in the first place.

Cc: stable@vger.kernel.org # v3.2+ (and watch out for __d_materialise_dentry())
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2016-06-07 21:26:55 -04:00
..
2016-01-20 17:09:18 -08:00
2016-05-27 15:26:11 -07:00
2016-05-20 17:58:30 -07:00
2016-05-23 17:04:14 -07:00
2016-05-23 17:04:14 -07:00
2016-04-26 12:00:48 -04:00
2016-01-22 18:04:28 -05:00
2016-05-23 17:04:14 -07:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
2016-05-26 19:34:26 -07:00
2016-05-26 20:00:28 -07:00
2016-01-22 18:04:28 -05:00
2016-05-23 17:04:14 -07:00
2016-01-22 18:04:28 -05:00
2016-06-05 00:23:09 -04:00
2016-01-22 18:04:28 -05:00
2016-04-18 11:18:55 +02:00
2016-01-22 18:04:28 -05:00