浏览代码

[INET]: inet_frag_evictor() must run with BH disabled

Based upon a lockdep trace from Dave Jones.

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 17 年之前
父节点
当前提交
e8e16b706e
共有 2 个文件被更改,包括 5 次插入0 次删除
  1. 3 0
      net/ipv4/inet_fragment.c
  2. 2 0
      net/ipv6/netfilter/nf_conntrack_reasm.c

+ 3 - 0
net/ipv4/inet_fragment.c

@@ -86,7 +86,10 @@ EXPORT_SYMBOL(inet_frags_fini);
 void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
 {
 	nf->low_thresh = 0;
+
+	local_bh_disable();
 	inet_frag_evictor(nf, f);
+	local_bh_enable();
 }
 EXPORT_SYMBOL(inet_frags_exit_net);
 

+ 2 - 0
net/ipv6/netfilter/nf_conntrack_reasm.c

@@ -171,7 +171,9 @@ static __inline__ void fq_kill(struct nf_ct_frag6_queue *fq)
 
 static void nf_ct_frag6_evictor(void)
 {
+	local_bh_disable();
 	inet_frag_evictor(&nf_init_frags, &nf_frags);
+	local_bh_enable();
 }
 
 static void nf_ct_frag6_expire(unsigned long data)