diff mbox series

[net,v2,1/1] atheros: fix return value check in atl1_tso()

Message ID 20230722142511.12448-1-ruc_gongyuanjun@163.com (mailing list archive)
State Accepted
Commit ed96824b71ed67664390890441b229423a25317f
Delegated to: Netdev Maintainers
Headers show
Series [net,v2,1/1] atheros: fix return value check in atl1_tso() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1366 this patch: 1366
netdev/cc_maintainers fail 2 blamed authors not CCed: jacliburn@bellsouth.net jeff@garzik.org; 7 maintainers not CCed: geoff@infradead.org wsa+renesas@sang-engineering.com jeff@garzik.org petrm@nvidia.com khalasa@piap.pl pabeni@redhat.com jacliburn@bellsouth.net
netdev/build_clang success Errors and warnings before: 1365 this patch: 1365
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1389 this patch: 1389
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Yuanjun Gong July 22, 2023, 2:25 p.m. UTC
in atl1_tso(), it should check the return value of pskb_trim(),
and return an error code if an unexpected value is returned
by pskb_trim().

Fixes: 401c0aabec4b ("atl1: simplify tx packet descriptor")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
---
 drivers/net/ethernet/atheros/atlx/atl1.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org July 24, 2023, 10:50 p.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 22 Jul 2023 22:25:11 +0800 you wrote:
> in atl1_tso(), it should check the return value of pskb_trim(),
> and return an error code if an unexpected value is returned
> by pskb_trim().
> 
> Fixes: 401c0aabec4b ("atl1: simplify tx packet descriptor")
> Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
> 
> [...]

Here is the summary with links:
  - [net,v2,1/1] atheros: fix return value check in atl1_tso()
    https://git.kernel.org/netdev/net/c/ed96824b71ed

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index c8444bcdf527..02aa6fd8ebc2 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -2113,8 +2113,11 @@  static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
 
 			real_len = (((unsigned char *)iph - skb->data) +
 				ntohs(iph->tot_len));
-			if (real_len < skb->len)
-				pskb_trim(skb, real_len);
+			if (real_len < skb->len) {
+				err = pskb_trim(skb, real_len);
+				if (err)
+					return err;
+			}
 			hdr_len = skb_tcp_all_headers(skb);
 			if (skb->len == hdr_len) {
 				iph->check = 0;