lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFy6-bga8LumLKO8Yc_83vA=p-g8sqUE-aGP-uF3Xb6e4w@mail.gmail.com>
Date:	Wed, 28 May 2014 13:02:23 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Al Viro <viro@...iv.linux.org.uk>
Cc:	Mika Westerberg <mika.westerberg@...ux.intel.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Miklos Szeredi <mszeredi@...e.cz>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: fs/dcache.c - BUG: soft lockup - CPU#5 stuck for 22s! [systemd-udevd:1667]

On Wed, May 28, 2014 at 12:43 PM, Linus Torvalds
<torvalds@...ux-foundation.org> wrote:
>  - the shrinker list logic depends on the actual freeing of the dentry
> to be delayed until the RCU grace period (already true for RCU-lookup
> dentries)

Side note: I just unconditionally removed the immediate __d_free()
case, but it could as well have become

-       if (!(dentry->d_flags & DCACHE_RCUACCESS))
+       if (!(dentry->d_flags & (DCACHE_RCUACCESS|DCACHE_SHRINK_LIST))
                __d_free(&dentry->d_u.d_rcu);
        else
                call_rcu(&dentry->d_u.d_rcu, __d_free);

instead.

Anyway, one reason I looked at this is that most of the threads in
Mika's NMI watchdog traces were stuck on _raw_spin_lock() in the whole
d_walk() thing, and I had a *really* hard time convincing myself that
this was all safe without the RCU lock. I'm wondering if Mika perhaps
has CONFIG_PREEMPT_RCU set, which means that spinlocks (or the
rename_lock sequence lock) do not end up being RCU-safe points.

And once I started worrying about that, the whole "ok, who calls
dentry_kill() when shrinking races with dput()" question started just
making me worry about that whole DCACHE_MAY_FREE thing.  Because one
of the things that Miklos/Al's series of patches did was to drop some
of the RCU locking, since it wasn't "necessary" any more as far as the
lru list itself was concerned..

             Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ