Re: [PATCH RFC 6/6] dcache: prevent flooding with negative dentries

2021-04-13 Thread Al Viro
On Thu, Jan 21, 2021 at 06:49:45PM +0530, Gautham Ananthakrishna wrote: > + spin_lock(&victim->d_lock); > + parent = lock_parent(victim); > + > + rcu_read_unlock(); Similar story. As soon as you hit that rcu_read_unlock(), the memory pointed to by victim might be reused. If you have

[PATCH RFC 6/6] dcache: prevent flooding with negative dentries

2021-01-21 Thread Gautham Ananthakrishna
From: Konstantin Khlebnikov Without memory pressure count of negative dentries isn't bounded. They could consume all memory and drain all other inactive caches. Typical scenario is an idle system where some process periodically creates temporary files and removes them. After some time, memory wi