diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-12-08 16:07:53 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-12-08 18:19:59 -0800 |
commit | 837e8ac871499d337212e2161c046f5adf1bad33 (patch) | |
tree | 2d7bb495b5ce2bce04bf18afd6a57116391efabc /net/dsa | |
parent | ff36c447e2330625066d193a25a8f94c1408d9d9 (diff) | |
parent | 010b6761a9fc5006267d99abb6f9f196bf5d3d13 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
No conflicts.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/tag_hellcreek.c | 3 | ||||
-rw-r--r-- | net/dsa/tag_ksz.c | 3 | ||||
-rw-r--r-- | net/dsa/tag_sja1105.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c index 71884296fc70..03a1fb9c87a9 100644 --- a/net/dsa/tag_hellcreek.c +++ b/net/dsa/tag_hellcreek.c @@ -51,7 +51,8 @@ static struct sk_buff *hellcreek_rcv(struct sk_buff *skb, return NULL; } - pskb_trim_rcsum(skb, skb->len - HELLCREEK_TAG_LEN); + if (pskb_trim_rcsum(skb, skb->len - HELLCREEK_TAG_LEN)) + return NULL; dsa_default_offload_fwd_mark(skb); diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 0f6ae143afc9..080e5c369f5b 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -27,7 +27,8 @@ static struct sk_buff *ksz_common_rcv(struct sk_buff *skb, if (!skb->dev) return NULL; - pskb_trim_rcsum(skb, skb->len - len); + if (pskb_trim_rcsum(skb, skb->len - len)) + return NULL; dsa_default_offload_fwd_mark(skb); diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index f14f51b41491..1c2ceba4771b 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -670,7 +670,8 @@ static struct sk_buff *sja1110_rcv_inband_control_extension(struct sk_buff *skb, * padding and trailer we need to account for the fact that * skb->data points to skb_mac_header(skb) + ETH_HLEN. */ - pskb_trim_rcsum(skb, start_of_padding - ETH_HLEN); + if (pskb_trim_rcsum(skb, start_of_padding - ETH_HLEN)) + return NULL; /* Trap-to-host frame, no timestamp trailer */ } else { *source_port = SJA1110_RX_HEADER_SRC_PORT(rx_header); |