]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Mar 2025 08:05:05 +0000 (09:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Mar 2025 08:05:05 +0000 (09:05 +0100)
No more build warnings.

queue-5.4/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch
queue-5.4/media-uvcvideo-remove-redundant-null-assignment.patch
queue-5.4/udp-gso-do-not-drop-small-packets-when-pmtu-reduces.patch

index eeeb3850c3f8cf5d741450c010f69ace23412490..277b090454cece9882a3488f23287254d0dd6f3a 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- 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;
index 29e9a94545ebd94c353d65bcf9011cca982b191d..45fdc51aa5422458a9b231b9504963c408877aba 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
 --- 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;
  
index c515934bfa6afafac0dba7eaaa3602955737650e..527bea571a526f44e3c8a8147332a541610eb04c 100644 (file)
@@ -27,52 +27,45 @@ Reviewed-by: Willem de Bruijn <willemb@google.com>
 Signed-off-by: David S. Miller <davem@davemloft.net>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- 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,