From: Simon Horman <horms@kernel.org>
To: Jeremy Kerr <jk@codeconstruct.com.au>
Cc: netdev@vger.kernel.org, Matt Johnston <matt@codeconstruct.com.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v2] net: mctp: take ownership of skb in mctp_local_output
Date: Tue, 20 Feb 2024 15:09:33 +0000 [thread overview]
Message-ID: <20240220150933.GP40273@kernel.org> (raw)
In-Reply-To: <20240220081053.1439104-1-jk@codeconstruct.com.au>
On Tue, Feb 20, 2024 at 04:10:53PM +0800, Jeremy Kerr wrote:
> Currently, mctp_local_output only takes ownership of skb on success, and
> we may leak an skb if mctp_local_output fails in specific states; the
> skb ownership isn't transferred until the actual output routing occurs.
>
> Instead, make mctp_local_output free the skb on all error paths up to
> the route action, so it always consumes the passed skb.
>
> Fixes: 833ef3b91de6 ("mctp: Populate socket implementation")
> Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
>
> ---
> v2:
> - retain EINVAL return code in !rt && !ifindex case. Based on feedback
> from Simon Horman <horms@kernel.org>.
Hi Jeremy,
Thanks for the update.
This one looks good to me.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-02-20 15:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 8:10 [PATCH net-next v2] net: mctp: take ownership of skb in mctp_local_output Jeremy Kerr
2024-02-20 15:09 ` Simon Horman [this message]
2024-02-23 3:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240220150933.GP40273@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jk@codeconstruct.com.au \
--cc=kuba@kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).