[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240219094622.GU40273@kernel.org>
Date: Mon, 19 Feb 2024 09:46:22 +0000
From: Simon Horman <horms@...nel.org>
To: Jeremy Kerr <jk@...econstruct.com.au>
Cc: netdev@...r.kernel.org, Matt Johnston <matt@...econstruct.com.au>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net] net: mctp: put sock on tag allocation failure
On Thu, Feb 15, 2024 at 03:53:08PM +0800, Jeremy Kerr wrote:
> We may hold an extra reference on a socket if a tag allocation fails: we
> optimistically allocate the sk_key, and take a ref there, but do not
> drop if we end up not using the allocated key.
>
> Ensure we're dropping the sock on this failure by doing a proper unref
> rather than directly kfree()ing.
>
> Fixes: de8a6b15d965 ("net: mctp: add an explicit reference from a mctp_sk_key to sock")
> Signed-off-by: Jeremy Kerr <jk@...econstruct.com.au>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists