lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 17 Sep 2014 14:11:22 -0700 From: Cong Wang <cwang@...pensource.com> To: John Fastabend <john.fastabend@...il.com> Cc: Cong Wang <xiyou.wangcong@...il.com>, David Miller <davem@...emloft.net>, Eric Dumazet <eric.dumazet@...il.com>, netdev <netdev@...r.kernel.org>, Jamal Hadi Salim <jhs@...atatu.com> Subject: Re: [net-next PATCH 2/2] net: sched: cls_u32 changes to knode must appear atomic to readers On Wed, Sep 17, 2014 at 12:12 PM, John Fastabend <john.fastabend@...il.com> wrote: > > -static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n) > +static int u32_destroy_key(struct tcf_proto *tp, struct tc_u_knode *n, bool pf) > { > tcf_unbind_filter(tp, &n->res); > tcf_exts_destroy(tp, &n->exts); > if (n->ht_down) > n->ht_down->refcnt--; > #ifdef CONFIG_CLS_U32_PERF > - free_percpu(n->pf); > + if (pf) Nit: 'free_pf' is a better name than just 'pf'. > + free_percpu(n->pf); > #endif > #ifdef CONFIG_CLS_U32_MARK > - free_percpu(n->pcpu_success); > + if (pf) > + free_percpu(n->pcpu_success); > #endif > kfree(n); > return 0; > } > > +static void u32_delete_key_rcu_pf(struct rcu_head *rcu) > +{ > + struct tc_u_knode *key = container_of(rcu, struct tc_u_knode, rcu); > + > + u32_destroy_key(key->tp, key, false); > +} I think you need a comment here to explain why you free it partially on purpose, it is not that clear, at least I spent some time to figure it out when I read your cls_tcindex patch. Thanks! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists