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]
Message-ID: <CAM_iQpX1oiOiGFejO8yKNM_VT2BSMH9aFk-_1nPDjfO=jFmNgQ@mail.gmail.com>
Date:   Thu, 10 Jan 2019 10:09:53 -0800
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Konstantin Khlebnikov <khlebnikov@...dex-team.ru>
Cc:     Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Catalin Marinas <catalin.marinas@....com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net/core/neighbour: tell kmemleak about hash tables

On Tue, Jan 8, 2019 at 1:30 AM Konstantin Khlebnikov
<khlebnikov@...dex-team.ru> wrote:
> @@ -443,12 +444,14 @@ static struct neigh_hash_table *neigh_hash_alloc(unsigned int shift)
>         ret = kmalloc(sizeof(*ret), GFP_ATOMIC);
>         if (!ret)
>                 return NULL;
> -       if (size <= PAGE_SIZE)
> +       if (size <= PAGE_SIZE) {
>                 buckets = kzalloc(size, GFP_ATOMIC);
> -       else
> +       } else {
>                 buckets = (struct neighbour __rcu **)
>                           __get_free_pages(GFP_ATOMIC | __GFP_ZERO,
>                                            get_order(size));
> +               kmemleak_alloc(buckets, size, 0, GFP_ATOMIC);

Why min_count is 0 rather than 1 here?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ