RE: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-03-01 Thread Joakim Zhang
-...@vger.kernel.org; > net...@vger.kernel.org; linux-kernel@vger.kernel.org > Subject: RE: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if > socket was closed before setting skb ownership > > > > -Original Message- > > From: Oleksij Rempel > &g

RE: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-03-01 Thread Joakim Zhang
ux-...@vger.kernel.org; net...@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if > socket > was closed before setting skb ownership > > There are two ref count variables controlling the free()ing of

Re: [PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-26 Thread Oliver Hartkopp
On 26.02.21 10:24, Oleksij Rempel wrote: There are two ref count variables controlling the free()ing of a socket: - struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() - struct sock::sk_wmem_alloc - which accounts the memory allocated by the skbs in the send path. In case

[PATCH net v4 1/1] can: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership

2021-02-26 Thread Oleksij Rempel
There are two ref count variables controlling the free()ing of a socket: - struct sock::sk_refcnt - which is changed by sock_hold()/sock_put() - struct sock::sk_wmem_alloc - which accounts the memory allocated by the skbs in the send path. In case there are still TX skbs on the fly and the