LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

[PATCH net-next] ipvs: missing unlock in ip_vs_expire_nodest_conn_flush(

To: Wensong Zhang <wensong@xxxxxxxxxxxx>
Subject: [PATCH net-next] ipvs: missing unlock in ip_vs_expire_nodest_conn_flush()
Cc: Simon Horman <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Jozsef Kadlecsik <kadlec@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Andrew Sy Kim <kim.andrewsy@xxxxxxxxx>, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, kernel-janitors@xxxxxxxxxxxxxxx
From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Date: Fri, 17 Jul 2020 17:10:29 +0300
We can't return without calling rcu_read_unlock().

Fixes: 04231e52d355 ("ipvs: queue delayed work to expire no destination 
connections if expire_nodest_conn=1")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 net/netfilter/ipvs/ip_vs_conn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipvs/ip_vs_conn.c b/net/netfilter/ipvs/ip_vs_conn.c
index a5e9b2d55e57..a90b8eac16ac 100644
--- a/net/netfilter/ipvs/ip_vs_conn.c
+++ b/net/netfilter/ipvs/ip_vs_conn.c
@@ -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();
 }
-- 
2.27.0


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH net-next] ipvs: missing unlock in ip_vs_expire_nodest_conn_flush(), Dan Carpenter <=