Patch "openvswitch: Fix double reporting of drops in dropwatch" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    openvswitch: Fix double reporting of drops in dropwatch

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     openvswitch-fix-double-reporting-of-drops-in-dropwat.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit cd0a591e51fbac6cf0381cb56478f7aabf64b84c
Author: Mike Pattrick <mkp@xxxxxxxxxx>
Date:   Wed Aug 17 11:06:34 2022 -0400

    openvswitch: Fix double reporting of drops in dropwatch
    
    [ Upstream commit 1100248a5c5ccd57059eb8d02ec077e839a23826 ]
    
    Frames sent to userspace can be reported as dropped in
    ovs_dp_process_packet, however, if they are dropped in the netlink code
    then netlink_attachskb will report the same frame as dropped.
    
    This patch checks for error codes which indicate that the frame has
    already been freed.
    
    Signed-off-by: Mike Pattrick <mkp@xxxxxxxxxx>
    Link: https://bugzilla.redhat.com/show_bug.cgi?id=2109946
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 5e2c83cb7b12..f4b088d418fb 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -251,10 +251,17 @@ void ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key)
 
 		upcall.mru = OVS_CB(skb)->mru;
 		error = ovs_dp_upcall(dp, skb, key, &upcall, 0);
-		if (unlikely(error))
-			kfree_skb(skb);
-		else
+		switch (error) {
+		case 0:
+		case -EAGAIN:
+		case -ERESTARTSYS:
+		case -EINTR:
 			consume_skb(skb);
+			break;
+		default:
+			kfree_skb(skb);
+			break;
+		}
 		stats_counter = &stats->n_missed;
 		goto out;
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux