Re: system panic while dentry reference count overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 07, 2019 at 12:23:23PM -0700, Linus Torvalds wrote:
> On Tue, May 7, 2019 at 12:16 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > Negative ->d_lockref.count are used for "lockref is dead"...
> 
> We can change that to just -1, can't we? It's equally easy to test for.

	Provided that lockref.c is updated accordingly (look at e.g.
lockref_get_not_zero()).

> Those aren't supposed to be incremented anyway, which is the whole point.
> 
> But we could do what the page refs also did: consider refcounts in the
> "small negative range" to be very special, because they are either
> critically close to an overflow, or they are actually a sign of a
> fatal underflow due to some bug. And make one of those be the dead
> marker.

	lockref_get_not_zero() hitting dead dentry is not abnormal,
so we'd better not complain in such case...  BTW, wouldn't that WARN_ON()
in dget() belong in lockref_get()?



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux