Re: [RFC PATCH v v2 0/4] avoid the extra atomic on a ref when closing a fd

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

 



On Wed, Mar 5, 2025 at 3:19 AM David Laight
<david.laight.linux@xxxxxxxxx> wrote:
> Have you looked at the problem caused by epoll() ?
> The epoll code has a 'hidden' extra reference to the fd.
> This doesn't usualy matter, but some of the driver callbacks add and
> remove an extra reference - which doesn't work well if fput() has
> just decremented it to zero.
>
> The fput code might need to do a 'decrement not one' so that the
> epoll tidyup can be done while the refcount is still one.
>
> That would save the extra atomic pair that (IIRC) got added into
> the epoll callback code.
>
> Thoughts?

I am not aware of this problem and don't have particular interest in
looking at it either, sorry.

Good thing you are free to make the case to Christian. :)
-- 
Mateusz Guzik <mjguzik gmail.com>





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

  Powered by Linux