net:ipv6: check return value of pskb_trim()
Subsystems (3)
PATCH v2 1/1 net:ipv6: check return value of pskb_trim()
goto tx_err if an unexpected result is returned by pskb_tirm() in ip6erspan_tunnel_xmit().
--- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv6/ip6_gre.c +2 -1
@@ -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; }
Signature · 1 line
2.17.1
Quoted 13 lines · Yuanjun Gong
goto
tx_errif an unexpected result is returned bypskb_tirm()inip6erspan_tunnel_xmit().Signed-off-by Yuanjun Gong <[email protected]>--- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/ipv6/ip6_gre.c +0
-0
net/ipv6/ip6_gre.c static netdev_tx_t ip6erspan_tunnel_xmit(struct sk_buff *skb, · line 962
Quoted 9 lines
net/ipv6/ip6_gre.c +2
-1@@ -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; }
PATCH v2 1/1 net:ipv6: check return value of pskb_trim()
In reply to Yuanjun GongFrom: Yuanjun Gong <[email protected]>
Date: Mon, 17 Jul 2023 22:45:19 +0800
Quoted 4 lines
goto
tx_errif an unexpected result is returned bypskb_tirm()inip6erspan_tunnel_xmit().Signed-off-by Yuanjun Gong <[email protected]>
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!
Quoted 20 lines
--- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)net/ipv6/ip6_gre.c +2
-1@@ -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; }Signature · 1 line
2.17.1
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 7 lines · On Mon, 17 Jul 2023 22:45:19 +0800 you wrote:
goto
tx_errif an unexpected result is returned bypskb_tirm()inip6erspan_tunnel_xmit().Signed-off-by Yuanjun Gong <[email protected]>--- net/ipv6/ip6_gre.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Here is the summary with links:
- [v2,1/1] net:ipv6: check return value of pskb_trim()
https://git.kernel.org/netdev/net/c/4258faa130be
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html