Skip to contentSkip to conversation

ipvs: ensure RCU read unlock when connection flushing and ipvs is disabled

PATCH In review Andrew Sy Kim 2 participants 2 messages Jul 16, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipvs: ensure RCU read unlock when connection flushing and ipvs is disabled

When ipvs is disabled in ip_vs_expire_nodest_conn_flush, we should break instead of return so that rcu_read_unlock() is run.

---
 net/netfilter/ipvs/ip_vs_conn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_conn.c +1 -1
index a5e9b2d55e57..a90b8eac16ac 100644
@@ -1422,7 +1422,7 @@ void ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
 
 		/* netns clean up started, abort delayed work */
 		if (!ipvs->enable)
-			return;
+			break;
 	}
 	rcu_read_unlock();
 }
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hello,

Quoted 5 lines · Andrew Sy Kim

When ipvs is disabled in ip_vs_expire_nodest_conn_flush, we should break instead of return so that rcu_read_unlock() is run.

Quoted 19 lines
---
 net/netfilter/ipvs/ip_vs_conn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/ipvs/ip_vs_conn.c +1 -1
index a5e9b2d55e57..a90b8eac16ac 100644
@@ -1422,7 +1422,7 @@ void ip_vs_expire_nodest_conn_flush(struct netns_ipvs *ipvs)
 
 		/* netns clean up started, abort delayed work */
 		if (!ipvs->enable)
-			return;
+			break;
 	}
 	rcu_read_unlock();
 }
Signature · 1 line
2.20.1

Regards

--
Julian Anastasov <[email protected]>