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: <ZckxObNXJnuKeExG@localhost.localdomain>
Date: Sun, 11 Feb 2024 21:42:33 +0100
From: Oscar Salvador <osalvador@...e.de>
To: Marco Elver <elver@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Michal Hocko <mhocko@...e.com>,
	Vlastimil Babka <vbabka@...e.cz>,
	Andrey Konovalov <andreyknvl@...il.com>,
	Alexander Potapenko <glider@...gle.com>
Subject: Re: [PATCH v7 2/4] mm,page_owner: Implement the tracking of the
 stacks count

On Fri, Feb 09, 2024 at 10:44:23PM +0100, Marco Elver wrote:
> > >                   * set a refcount of 1 ourselves.
> > >                   */
> > >                  if (refcount_read(&stack->count) == REFCOUNT_SATURATED)
> > >                          refcount_set(&stack->count, 1);
> 
> Do you need to inc the first allocation? Should there be an "else"
> here instead of always doing refcount_inc()?

Yes, I need to inc in the first allocation, otherwise on the first free
op, refcount goes to 0, and when the next allocation comes around,
I will get a warning because of going from refcount 0 to 1.


-- 
Oscar Salvador
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ