All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Jiri Wiesner <jwiesner@suse.de>
Cc: netdev@vger.kernel.org, Moshe Tal <moshet@nvidia.com>,
	Jussi Maki <joamaki@gmail.com>,
	Andy Gospodarek <andy@greyhouse.net>,
	"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] bonding: Return pointer to data after pull on skb
Date: Tue, 10 Oct 2023 11:45:47 -0700	[thread overview]
Message-ID: <28783.1696963547@famine> (raw)
In-Reply-To: <20231010163933.GA534@incl>

Jiri Wiesner <jwiesner@suse.de> wrote:

>Since 429e3d123d9a ("bonding: Fix extraction of ports from the packet
>headers"), header offsets used to compute a hash in bond_xmit_hash() are
>relative to skb->data and not skb->head. If the tail of the header buffer
>of an skb really needs to be advanced and the operation is successful, the
>pointer to the data must be returned (and not a pointer to the head of the
>buffer).

Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>

>Fixes: 429e3d123d9a ("bonding: Fix extraction of ports from the packet headers")
>Signed-off-by: Jiri Wiesner <jwiesner@suse.de>
>---
> drivers/net/bonding/bond_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index ed7212e61c54..51d47eda1c87 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -4023,7 +4023,7 @@ static inline const void *bond_pull_data(struct sk_buff *skb,
> 	if (likely(n <= hlen))
> 		return data;
> 	else if (skb && likely(pskb_may_pull(skb, n)))
>-		return skb->head;
>+		return skb->data;
> 
> 	return NULL;
> }
>-- 
>2.35.3
>
>
>-- 
>Jiri Wiesner
>SUSE Labs
>

  reply	other threads:[~2023-10-10 18:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 16:39 [PATCH net] bonding: Return pointer to data after pull on skb Jiri Wiesner
2023-10-10 18:45 ` Jay Vosburgh [this message]
2023-10-11 16:16 ` Jiri Pirko
2023-10-13 10: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=28783.1696963547@famine \
    --to=jay.vosburgh@canonical.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joamaki@gmail.com \
    --cc=jwiesner@suse.de \
    --cc=kuba@kernel.org \
    --cc=moshet@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.