Re: [v3 PATCH] netlink: Do not schedule work from sk_destruct

2016-12-05 Thread David Miller
From: Herbert Xu Date: Mon, 5 Dec 2016 15:28:21 +0800 > It is wrong to schedule a work from sk_destruct using the socket > as the memory reserve because the socket will be freed immediately > after the return from sk_destruct. > > Instead we should do the deferral prior to sk_free. > > This pat

Re: [v3 PATCH] netlink: Do not schedule work from sk_destruct

2016-12-05 Thread Andrey Konovalov
On Mon, Dec 5, 2016 at 8:28 AM, Herbert Xu wrote: > On Mon, Dec 05, 2016 at 03:26:00PM +0800, Herbert Xu wrote: >> On Mon, Dec 05, 2016 at 03:19:46PM +0800, Herbert Xu wrote: >> > >> > Thanks for the patch. It'll obviously work but I wanted avoid that >> > because it penalises the common path for

[v3 PATCH] netlink: Do not schedule work from sk_destruct

2016-12-05 Thread Herbert Xu
On Mon, Dec 05, 2016 at 03:26:00PM +0800, Herbert Xu wrote: > On Mon, Dec 05, 2016 at 03:19:46PM +0800, Herbert Xu wrote: > > > > Thanks for the patch. It'll obviously work but I wanted avoid that > > because it penalises the common path for the rare case. > > > > Andrey, please try this patch an