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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 13 Dec 2022 10:59:59 -0800
From:   Eric Biggers <>
To:     Paolo Abeni <>
        Soheil Hassas Yeganeh <>,
        Al Viro <>,
        Davidlohr Bueso <>,
        Jason Baron <>,,
        Carlos Maiolino <>
Subject: Re: [PATCH v3] epoll: use refcount to reduce ep_mutex contention

On Tue, Dec 13, 2022 at 07:21:14PM +0100, Paolo Abeni wrote:
> Hi,
> On Mon, 2022-12-12 at 22:01 -0800, Eric Biggers wrote:
> > I am trying to understand whether this patch is correct.
> > 
> > One thing that would help would be to use more standard naming:
> > 
> > 	ep_put => ep_refcount_dec_and_test (or ep_put_and_test)
> > 	ep_dispose => ep_free
> > 	ep_free => ep_clear_and_put
> Thank you for the feedback. 
> I must admit I'm not good at all at selecting good names, so I
> definitelly will apply the above. I additionally still have to cover
> the feedback from Jacob - switching the reference count to a kref - as
> I've been diverted to other tasks.
> I hope to be able to share a new revision of this patch next week.

Using 'refcount_t' directly is another option.

I think a plain 'unsigned int' would be fine here, if all reads and writes of
the refcount really happen under a mutex.  Using refcount_t (or kref) would add
some extra sanity checks, though.

- Eric

Powered by blists - more mailing lists