Re: [PATCH net-next v16 06/26] kref/refcount: implement kref_put_sock()

2024-12-30 Thread Antonio Quartulli
Hi Will, Thanks a lot for chiming in and sorry for the delay. See below. On 19/12/24 18:20, Will Deacon wrote: [...] +/** + * refcount_dec_and_lock_sock - return holding locked sock if able to decrement + * refcount to 0 + * @r: the refcount + * @sock: the sock to be

Re: [PATCH net-next v16 06/26] kref/refcount: implement kref_put_sock()

2024-12-19 Thread Will Deacon
On Thu, Dec 19, 2024 at 02:42:00AM +0100, Antonio Quartulli wrote: > Similarly so kref_put_lock(), decrease the refcount > and call bh_lock_sock(sk) if it reached 0. > > This kref_put variant comes handy when in need of > atomically cleanup any socket context along with > setting the refcount to 0

[PATCH net-next v16 06/26] kref/refcount: implement kref_put_sock()

2024-12-18 Thread Antonio Quartulli
Similarly so kref_put_lock(), decrease the refcount and call bh_lock_sock(sk) if it reached 0. This kref_put variant comes handy when in need of atomically cleanup any socket context along with setting the refcount to 0. Cc: Will Deacon (maintainer:ATOMIC INFRASTRUCTURE) Cc: Peter Zijlstra (mai