Blame SOURCES/0042-tc-fix-command-tc-actions-del-hang-issue.patch

be97f7
From dbc597c9d1e0e65cc9d989d8057f9a083c2f5779 Mon Sep 17 00:00:00 2001
be97f7
From: Phil Sutter <psutter@redhat.com>
be97f7
Date: Fri, 15 Dec 2017 16:13:46 +0100
be97f7
Subject: [PATCH] tc: fix command "tc actions del" hang issue
be97f7
be97f7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1526394
be97f7
Upstream Status: iproute2.git commit 83cf5bc73b858
be97f7
be97f7
commit 83cf5bc73b858608d59c3c6126a9f37e793e15dd
be97f7
Author: Chris Mi <chrism@mellanox.com>
be97f7
Date:   Thu Dec 14 18:09:00 2017 +0900
be97f7
be97f7
    tc: fix command "tc actions del" hang issue
be97f7
be97f7
    If command is RTM_DELACTION, a non-NULL pointer is passed to rtnl_talk().
be97f7
    Then flag NLM_F_ACK is not set on n->nlmsg_flags and netlink_ack() will
be97f7
    not be called. Command tc will wait for the reply for ever.
be97f7
be97f7
    Fixes: 86bf43c7c2fd ("lib/libnetlink: update rtnl_talk to support malloc buff at run time")
be97f7
    Reviewed-by: Jiri Pirko <jiri@mellanox.com>
be97f7
    Signed-off-by: Chris Mi <chrism@mellanox.com>
be97f7
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
be97f7
---
be97f7
 tc/m_action.c | 2 +-
be97f7
 1 file changed, 1 insertion(+), 1 deletion(-)
be97f7
be97f7
diff --git a/tc/m_action.c b/tc/m_action.c
be97f7
index 90b2a11..7cfd9e0 100644
be97f7
--- a/tc/m_action.c
be97f7
+++ b/tc/m_action.c
be97f7
@@ -507,7 +507,7 @@ static int tc_action_gd(int cmd, unsigned int flags, int *argc_p, char ***argv_p
be97f7
 
be97f7
 	req.n.nlmsg_seq = rth.dump = ++rth.seq;
be97f7
 
be97f7
-	if (rtnl_talk(&rth, &req.n, &ans) < 0) {
be97f7
+	if (rtnl_talk(&rth, &req.n, cmd == RTM_DELACTION ? NULL : &ans) < 0) {
be97f7
 		fprintf(stderr, "We have an error talking to the kernel\n");
be97f7
 		return 1;
be97f7
 	}
be97f7
-- 
be97f7
1.8.3.1
be97f7