From: Tariq Toukan <ttoukan.linux@gmail.com>
To: Yuanjun Gong <ruc_gongyuanjun@163.com>,
Saeed Mahameed <saeedm@nvidia.com>,
Boris Pismenny <borisp@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>
Subject: Re: [PATCH 1/1] drivers:net: fix return value check in mlx5e_ipsec_remove_trailer
Date: Mon, 17 Jul 2023 21:48:10 +0300 [thread overview]
Message-ID: <bcf79bb0-00e2-5e4b-807f-ba43d4c122a9@gmail.com> (raw)
In-Reply-To: <20230717144640.23166-1-ruc_gongyuanjun@163.com>
On 17/07/2023 17:46, Yuanjun Gong wrote:
> mlx5e_ipsec_remove_trailer should return an error code if function
> pskb_trim returns an unexpected value.
>
It's a fix, please add a Fixes tag.
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
> index eab5bc718771..8d995e304869 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
> @@ -58,7 +58,9 @@ static int mlx5e_ipsec_remove_trailer(struct sk_buff *skb, struct xfrm_state *x)
>
> trailer_len = alen + plen + 2;
>
> - pskb_trim(skb, skb->len - trailer_len);
> + ret = pskb_trim(skb, skb->len - trailer_len);
> + if (unlikely(ret))
> + return ret;
> if (skb->protocol == htons(ETH_P_IP)) {
> ipv4hdr->tot_len = htons(ntohs(ipv4hdr->tot_len) - trailer_len);
> ip_send_check(ipv4hdr);
Other than that:
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
next prev parent reply other threads:[~2023-07-17 18:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 14:46 [PATCH 1/1] drivers:net: fix return value check in mlx5e_ipsec_remove_trailer Yuanjun Gong
2023-07-17 18:48 ` Tariq Toukan [this message]
2023-07-17 18:55 ` Leon Romanovsky
2023-07-25 6:56 ` [PATCH net v2 1/1] net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer() Yuanjun Gong
2023-07-26 11:41 ` Leon Romanovsky
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=bcf79bb0-00e2-5e4b-807f-ba43d4c122a9@gmail.com \
--to=ttoukan.linux@gmail.com \
--cc=borisp@nvidia.com \
--cc=leon@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ruc_gongyuanjun@163.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.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).