Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipvs: avoid kfree_rcu without 2nd arg

Avoid possible synchronize_rcu() as part from the
kfree_rcu() call when 2nd arg is not provided.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

authored by

Julian Anastasov and committed by
Pablo Neira Ayuso
e4d0fe71 f6477ec6

+2 -1
+1
include/net/ip_vs.h
··· 461 461 462 462 /* Multiple chains processed in same tick */ 463 463 struct ip_vs_est_tick_data { 464 + struct rcu_head rcu_head; 464 465 struct hlist_head chains[IPVS_EST_TICK_CHAINS]; 465 466 DECLARE_BITMAP(present, IPVS_EST_TICK_CHAINS); 466 467 DECLARE_BITMAP(full, IPVS_EST_TICK_CHAINS);
+1 -1
net/netfilter/ipvs/ip_vs_est.c
··· 549 549 __set_bit(row, kd->avail); 550 550 if (!kd->tick_len[row]) { 551 551 RCU_INIT_POINTER(kd->ticks[row], NULL); 552 - kfree_rcu(td); 552 + kfree_rcu(td, rcu_head); 553 553 } 554 554 kd->est_count--; 555 555 if (kd->est_count) {