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: <b19ef19f-7e11-4aa8-86a5-daf88d9df48a@lucifer.local>
Date: Thu, 15 Jan 2026 12:32:50 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: "David Hildenbrand (Red Hat)" <david@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        linuxppc-dev@...ts.ozlabs.org,
        Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
        linux-doc@...r.kernel.org, virtualization@...ts.linux.dev,
        Andrew Morton <akpm@...ux-foundation.org>,
        Oscar Salvador <osalvador@...e.de>,
        "Liam R. Howlett" <Liam.Howlett@...cle.com>,
        Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
        Suren Baghdasaryan <surenb@...gle.com>, Michal Hocko <mhocko@...e.com>,
        Jonathan Corbet <corbet@....net>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jerrin Shaji George <jerrin.shaji-george@...adcom.com>,
        "Michael S. Tsirkin" <mst@...hat.com>,
        Jason Wang <jasowang@...hat.com>,
        Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
        Eugenio Pérez <eperezma@...hat.com>,
        Zi Yan <ziy@...dia.com>
Subject: Re: [PATCH v2 15/23] mm/balloon_compaction: assert that the
 balloon_pages_lock is held

On Thu, Jan 15, 2026 at 10:20:05AM +0100, David Hildenbrand (Red Hat) wrote:
> Let's add some sanity checks for holding the balloon_pages_lock when
> we're effectively inflating/deflating a page.
>
> Signed-off-by: David Hildenbrand (Red Hat) <david@...nel.org>

Seems reasonable to me, so:

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>

> ---
>  mm/balloon_compaction.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
> index 717bc43732d09..f6e0582bd7ffe 100644
> --- a/mm/balloon_compaction.c
> +++ b/mm/balloon_compaction.c
> @@ -33,6 +33,7 @@ static inline struct balloon_dev_info *balloon_page_device(struct page *page)
>  static inline void balloon_page_insert(struct balloon_dev_info *balloon,
>  				       struct page *page)
>  {
> +	lockdep_assert_held(&balloon_pages_lock);
>  	__SetPageOffline(page);
>  	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION)) {
>  		SetPageMovableOps(page);
> @@ -50,6 +51,7 @@ static inline void balloon_page_insert(struct balloon_dev_info *balloon,
>   */
>  static inline void balloon_page_finalize(struct page *page)
>  {
> +	lockdep_assert_held(&balloon_pages_lock);
>  	if (IS_ENABLED(CONFIG_BALLOON_COMPACTION))
>  		set_page_private(page, 0);
>  	/* PageOffline is sticky until the page is freed to the buddy. */
> --
> 2.52.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ