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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 May 2017 22:57:46 +0200
From:   Jiri Pirko <jiri@...nulli.us>
To:     Cong Wang <xiyou.wangcong@...il.com>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        David Miller <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        David Ahern <dsa@...ulusnetworks.com>,
        Eric Dumazet <edumazet@...gle.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexander Duyck <alexander.h.duyck@...el.com>,
        Simon Horman <simon.horman@...ronome.com>, mlxsw@...lanox.com
Subject: Re: [patch net-next v3 02/10] net: sched: introduce tcf block
 infractructure

Tue, May 16, 2017 at 10:51:30PM CEST, xiyou.wangcong@...il.com wrote:
>On Tue, May 16, 2017 at 10:27 AM, Jiri Pirko <jiri@...nulli.us> wrote:
>> +int tcf_block_get(struct tcf_block **p_block,
>> +                 struct tcf_proto __rcu **p_filter_chain)
>> +{
>> +       struct tcf_block *block = kzalloc(sizeof(*block), GFP_KERNEL);
>> +
>> +       if (!block)
>> +               return -ENOMEM;
>> +       block->p_filter_chain = p_filter_chain;
>> +       *p_block = block;
>> +       return 0;
>> +}
>> +EXPORT_SYMBOL(tcf_block_get);
>
>
>XXX_get() is usually for refcnt'ing, here you only allocate
>a block, so please rename it to tcf_block_alloc().

I already replied to the same Jamal's comment.


>
>
>> +
>> +void tcf_block_put(struct tcf_block *block)
>> +{
>> +       if (!block)
>> +               return;
>> +       tcf_destroy_chain(block->p_filter_chain);
>> +       kfree(block);
>> +}
>> +EXPORT_SYMBOL(tcf_block_put);
>
>Ditto, tcf_block_destroy().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ