[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1452794435.1223.104.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Thu, 14 Jan 2016 10:00:35 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Rainer Weikusat <rweikusat@...ileactivedefense.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] af_unix: Use kfree for addresses in unix_bind
On Thu, 2016-01-14 at 16:22 +0000, Rainer Weikusat wrote:
> Use kfree instead of unix_release_addr when freeing newly-allocated
> unix_address structures after binding the socket failed. The second
> function does an atomic_dec_and_test in order to free the address once
> its reference count falls to zero which isn't necessary for the
> unix_bind error path as the new structure wasn't published yet. 'Using
> kfree' is also how unix_autobind handles this case.
>
> Signed-off-by: Rainer Weikusat <rweikusat@...ileactivedefense.com>
> ---
This looks net-next material ?
net-next tree is closed during merge window.
Not sure what you gain by optimizing error paths ...
Powered by blists - more mailing lists