From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5BA317553 for ; Wed, 21 Feb 2024 22:33:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708554782; cv=none; b=jeBqSBRBS0RpZuTgm/SMsnzjRa9h5LqfjNfwv/R9gUv3bU7ODqVH81MCOmXixipjPjMM2tOQjDtLDPF3yxznHMIf+Slbs2fLLCt87JaNIUFiYxj89e+Frc34h3LMrjanjb+1FPNTMVjehnMWvl8+hIoJuAwZUrGC3A5qV0slxO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708554782; c=relaxed/simple; bh=OpGpBztEQDHK2btdrsRPH8UdVqSA31u/NDebEWrybpk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FhYZrXgyDjKHR2/ot9ZZtTZ4ecycCJ9/NQFPLabRmgaMF1C1430OxG7zBgPJF7oYAc+C7iSwdGhohtaCulMVdITVAmdc5qQTjX8eSwxJi8EiarLMs49pOFmpC+VgLJhjKM7lowN6uVXtUkvdUTqeLfpyP3ncR/hr562gkoB/CV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kdEDmNcp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kdEDmNcp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47DA7C433F1; Wed, 21 Feb 2024 22:33:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708554781; bh=OpGpBztEQDHK2btdrsRPH8UdVqSA31u/NDebEWrybpk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kdEDmNcpcsrnIRx9Xe0+bfsIbOXrP5dY+UzxT2yzICDOhGJJ7UQj1CJJ7MFS894OL b7rYhWcLqPOtJw5VFf9X7SD+4vaFJZt2gMqN17sAtIDD4dRqiV2XienZ/f3s0w1ChY kqY5N83uiRBGB9HhNXd3QWY67wo4ywxpoceKNNG+L6VbfJMQUAhGJb9wjv21Dh2Nqf EuoMgA3EorZH/fmv7N+49Y2dNC5KS+Fr9Zt8bAGNlu7L4PrFTFivZVRaVfVwDJD+nM rfnxn7Cl1pEAVm3wTCe7nzkmGlkFRQMtRlKOubyUJKcF8hVhCCzAAPkVSrBHyb3Fq7 hmVSz7i1qYPog== Date: Wed, 21 Feb 2024 14:33:00 -0800 From: Jakub Kicinski To: Jeremy Kerr Cc: netdev@vger.kernel.org, Matt Johnston , "David S. Miller" , Eric Dumazet , Paolo Abeni Subject: Re: [PATCH net] net: mctp: put sock on tag allocation failure Message-ID: <20240221143300.0ddec4a4@kernel.org> In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 15 Feb 2024 15:53:08 +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 Hi Jeremy! This patch is good to be applied, right? It got marked Not Applicable in patchwork, not sure why.