From: Greg Kroah-Hartman Date: Wed, 12 Mar 2025 08:05:05 +0000 (+0100) Subject: fix up queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch X-Git-Tag: v5.4.291~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be144683ec38f37d92b2948cdba8ce436c84c8e6;p=thirdparty%2Fkernel%2Fstable-queue.git fix up queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch No more build warnings. --- diff --git a/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch b/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch index eeeb3850c3..277b090454 100644 --- a/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch +++ b/queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch @@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c -@@ -1400,13 +1400,13 @@ static void uvc_ctrl_send_events(struct +@@ -1435,13 +1435,13 @@ static void uvc_ctrl_send_events(struct { struct uvc_control_mapping *mapping; struct uvc_control *ctrl; diff --git a/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch b/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch index 29e9a94545..45fdc51aa5 100644 --- a/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch +++ b/queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman --- a/drivers/media/usb/uvc/uvc_ctrl.c +++ b/drivers/media/usb/uvc/uvc_ctrl.c -@@ -1367,10 +1367,8 @@ bool uvc_ctrl_status_event_async(struct +@@ -1402,10 +1402,8 @@ bool uvc_ctrl_status_event_async(struct struct uvc_device *dev = chain->dev; struct uvc_ctrl_work *w = &dev->async_ctrl; diff --git a/queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch b/queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch index c515934bfa..527bea571a 100644 --- a/queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch +++ b/queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch @@ -27,52 +27,45 @@ Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- - net/ipv4/udp.c | 4 ++-- - net/ipv6/udp.c | 4 ++-- - tools/testing/selftests/net/udpgso.c | 26 ++++++++++++++++++++++++++ + net/ipv4/udp.c | 4 ++-- + net/ipv6/udp.c | 4 ++-- + tools/testing/selftests/net/udpgso.c | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 4 deletions(-) -diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c -index 1ccdb6a9ab892..f85c48858341d 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c -@@ -849,9 +849,9 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4, +@@ -849,9 +849,9 @@ static int udp_send_skb(struct sk_buff * const int hlen = skb_network_header_len(skb) + sizeof(struct udphdr); - if (hlen + cork->gso_size > cork->fragsize) { -+ if (hlen + min(datalen, cork->gso_size) > cork->fragsize) { ++ if (hlen + min_t(int, datalen, cork->gso_size) > cork->fragsize) { kfree_skb(skb); - return -EINVAL; + return -EMSGSIZE; } if (datalen > cork->gso_size * UDP_MAX_SEGMENTS) { kfree_skb(skb); -diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c -index e6fdb842e89df..58793dd7ac2c4 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c -@@ -1141,9 +1141,9 @@ static int udp_v6_send_skb(struct sk_buff *skb, struct flowi6 *fl6, +@@ -1141,9 +1141,9 @@ static int udp_v6_send_skb(struct sk_buf const int hlen = skb_network_header_len(skb) + sizeof(struct udphdr); - if (hlen + cork->gso_size > cork->fragsize) { -+ if (hlen + min(datalen, cork->gso_size) > cork->fragsize) { ++ if (hlen + min_t(int, datalen, cork->gso_size) > cork->fragsize) { kfree_skb(skb); - return -EINVAL; + return -EMSGSIZE; } if (datalen > cork->gso_size * UDP_MAX_SEGMENTS) { kfree_skb(skb); -diff --git a/tools/testing/selftests/net/udpgso.c b/tools/testing/selftests/net/udpgso.c -index 7badaf215de28..0e137182a4f40 100644 --- a/tools/testing/selftests/net/udpgso.c +++ b/tools/testing/selftests/net/udpgso.c -@@ -94,6 +94,19 @@ struct testcase testcases_v4[] = { - .gso_len = CONST_MSS_V4, +@@ -95,6 +95,19 @@ struct testcase testcases_v4[] = { .r_num_mss = 1, }, -+ { + { + /* datalen <= MSS < gso_len: will fall back to no GSO */ + .tlen = CONST_MSS_V4, + .gso_len = CONST_MSS_V4 + 1, @@ -85,14 +78,14 @@ index 7badaf215de28..0e137182a4f40 100644 + .gso_len = CONST_MSS_V4 + 2, + .tfail = true, + }, - { ++ { /* send a single MSS + 1B */ .tlen = CONST_MSS_V4 + 1, -@@ -197,6 +210,19 @@ struct testcase testcases_v6[] = { - .gso_len = CONST_MSS_V6, + .gso_len = CONST_MSS_V4, +@@ -198,6 +211,19 @@ struct testcase testcases_v6[] = { .r_num_mss = 1, }, -+ { + { + /* datalen <= MSS < gso_len: will fall back to no GSO */ + .tlen = CONST_MSS_V6, + .gso_len = CONST_MSS_V6 + 1, @@ -105,9 +98,7 @@ index 7badaf215de28..0e137182a4f40 100644 + .gso_len = CONST_MSS_V6 + 2, + .tfail = true + }, - { ++ { /* send a single MSS + 1B */ .tlen = CONST_MSS_V6 + 1, --- -2.39.5 - + .gso_len = CONST_MSS_V6,