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:   Fri, 26 Aug 2016 10:04:35 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     CAI Qian <caiqian@...hat.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Graf <tgraf@...g.ch>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: possible memory leak in ipc

On Fri, Aug 26, 2016 at 10:00 AM, Cong Wang <xiyou.wangcong@...il.com> wrote:
> On Fri, Aug 26, 2016 at 8:41 AM, Eric Dumazet <edumazet@...gle.com> wrote:
>>
>> There is a trivial bug in alloc_bucket_locks()
>> I will send a patch.
>
>
> Yeah, the 'else' branch looks so suspicious. ;)

It was correct until...

commit 4cf0b354d92ee2c642532ee39e330f8f580fd985
Author: Florian Westphal <fw@...len.de>
Date:   Fri Aug 12 12:03:52 2016 +0200

    rhashtable: avoid large lock-array allocations


which is:

@@ -83,6 +83,9 @@ static int alloc_bucket_locks(struct rhashtable *ht,
struct bucket_table *tbl,
                        tbl->locks = vmalloc(size * sizeof(spinlock_t));
                else
 #endif
+               if (gfp != GFP_KERNEL)
+                       gfp |= __GFP_NOWARN | __GFP_NORETRY;
+
                tbl->locks = kmalloc_array(size, sizeof(spinlock_t),
                                           gfp);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ