From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <ruc_gongyuanjun@163.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
<netdev@vger.kernel.org>, Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: [PATCH v2 1/1] net:ipv6: check return value of pskb_trim()
Date: Mon, 17 Jul 2023 12:04:54 -0700 [thread overview]
Message-ID: <20230717190454.94209-1-kuniyu@amazon.com> (raw)
In-Reply-To: <20230717144519.21740-1-ruc_gongyuanjun@163.com>
From: Yuanjun Gong <ruc_gongyuanjun@163.com>
Date: Mon, 17 Jul 2023 22:45:19 +0800
> goto tx_err if an unexpected result is returned by pskb_tirm()
> in ip6erspan_tunnel_xmit().
>
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Fixes: 5a963eb61b7c ("ip6_gre: Add ERSPAN native tunnel support")
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Please keep these in mind for an acutual fix from next time.
* Add Fixes: tag in changelog
* Specify target tree as net in mail subject
See also Documentation/process/maintainer-netdev.rst
Thanks!
> ---
> net/ipv6/ip6_gre.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
> index da80974ad23a..070d87abf7c0 100644
> --- a/net/ipv6/ip6_gre.c
> +++ b/net/ipv6/ip6_gre.c
> @@ -955,7 +955,8 @@ static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb,
> goto tx_err;
>
> if (skb->len > dev->mtu + dev->hard_header_len) {
> - pskb_trim(skb, dev->mtu + dev->hard_header_len);
> + if (pskb_trim(skb, dev->mtu + dev->hard_header_len))
> + goto tx_err;
> truncate = true;
> }
>
> --
> 2.17.1
next prev parent reply other threads:[~2023-07-17 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 14:45 [PATCH v2 1/1] net:ipv6: check return value of pskb_trim() Yuanjun Gong
2023-07-17 16:45 ` David Ahern
2023-07-17 19:04 ` Kuniyuki Iwashima [this message]
2023-07-19 11: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=20230717190454.94209-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ruc_gongyuanjun@163.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).