From c8566a5e8b62dabee0250cd27a4c6cbfdde3deb1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 26 Jul 2021 18:51:34 +0200 Subject: [PATCH] 5.10-stable patches added patches: skbuff-fix-build-with-skb-extensions-disabled.patch --- queue-5.10/series | 1 + ...x-build-with-skb-extensions-disabled.patch | 45 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 queue-5.10/skbuff-fix-build-with-skb-extensions-disabled.patch diff --git a/queue-5.10/series b/queue-5.10/series index 2a0275760ca..caeb3168c77 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -165,3 +165,4 @@ usb-ehci-prevent-missed-ehci-interrupts-with-edge-triggered-msi.patch drm-i915-gvt-clear-d3_entered-on-elsp-cmd-submission.patch sfc-ensure-correct-number-of-xdp-queues.patch xhci-add-xhci_get_virt_ep-helper.patch +skbuff-fix-build-with-skb-extensions-disabled.patch diff --git a/queue-5.10/skbuff-fix-build-with-skb-extensions-disabled.patch b/queue-5.10/skbuff-fix-build-with-skb-extensions-disabled.patch new file mode 100644 index 00000000000..2e5107b8e1f --- /dev/null +++ b/queue-5.10/skbuff-fix-build-with-skb-extensions-disabled.patch @@ -0,0 +1,45 @@ +From 9615fe36b31d926f1c5107013b772dc226a6a7ca Mon Sep 17 00:00:00 2001 +From: Florian Fainelli +Date: Wed, 7 Jul 2021 21:10:51 -0700 +Subject: skbuff: Fix build with SKB extensions disabled + +From: Florian Fainelli + +commit 9615fe36b31d926f1c5107013b772dc226a6a7ca upstream. + +We will fail to build with CONFIG_SKB_EXTENSIONS disabled after +8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used +skbs") since there is an unconditionally use of skb_ext_find() without +an appropriate stub. Simply build the code conditionally and properly +guard against both COFNIG_SKB_EXTENSIONS as well as +CONFIG_NET_TC_SKB_EXT being disabled. + +Fixes: Fixes: 8550ff8d8c75 ("skbuff: Release nfct refcount on napi stolen or re-used skbs") +Signed-off-by: Florian Fainelli +Reviewed-by: Roi Dayan +Reviewed-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/core/dev.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -5872,7 +5872,7 @@ static struct list_head *gro_list_prepar + maclen); + + diffs |= skb_get_nfct(p) ^ skb_get_nfct(skb); +- ++#if IS_ENABLED(CONFIG_SKB_EXTENSIONS) && IS_ENABLED(CONFIG_NET_TC_SKB_EXT) + if (!diffs) { + struct tc_skb_ext *skb_ext = skb_ext_find(skb, TC_SKB_EXT); + struct tc_skb_ext *p_ext = skb_ext_find(p, TC_SKB_EXT); +@@ -5881,6 +5881,7 @@ static struct list_head *gro_list_prepar + if (!diffs && unlikely(skb_ext)) + diffs |= p_ext->chain ^ skb_ext->chain; + } ++#endif + + NAPI_GRO_CB(p)->same_flow = !diffs; + } -- 2.47.3