* [PATCH net] bonding: Return pointer to data after pull on skb
@ 2023-10-10 16:39 Jiri Wiesner
2023-10-10 18:45 ` Jay Vosburgh
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jiri Wiesner @ 2023-10-10 16:39 UTC (permalink / raw)
To: netdev
Cc: Moshe Tal, Jussi Maki, Jay Vosburgh, Andy Gospodarek,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
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).
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: Return pointer to data after pull on skb
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
2023-10-11 16:16 ` Jiri Pirko
2023-10-13 10:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jay Vosburgh @ 2023-10-10 18:45 UTC (permalink / raw)
To: Jiri Wiesner
Cc: netdev, Moshe Tal, Jussi Maki, Andy Gospodarek, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: Return pointer to data after pull on skb
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
@ 2023-10-11 16:16 ` Jiri Pirko
2023-10-13 10:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2023-10-11 16:16 UTC (permalink / raw)
To: Jiri Wiesner
Cc: netdev, Moshe Tal, Jussi Maki, Jay Vosburgh, Andy Gospodarek,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Tue, Oct 10, 2023 at 06:39:33PM CEST, 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).
>
>Fixes: 429e3d123d9a ("bonding: Fix extraction of ports from the packet headers")
>Signed-off-by: Jiri Wiesner <jwiesner@suse.de>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bonding: Return pointer to data after pull on skb
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
2023-10-11 16:16 ` Jiri Pirko
@ 2023-10-13 10:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-10-13 10:30 UTC (permalink / raw)
To: Jiri Wiesner
Cc: netdev, moshet, joamaki, j.vosburgh, andy, davem, edumazet, kuba,
pabeni
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 10 Oct 2023 18:39:33 +0200 you 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).
>
> [...]
Here is the summary with links:
- [net] bonding: Return pointer to data after pull on skb
https://git.kernel.org/netdev/net/c/d93f3f992780
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-13 10:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-10-11 16:16 ` Jiri Pirko
2023-10-13 10:30 ` patchwork-bot+netdevbpf
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).