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] [day] [month] [year] [list]
Message-ID: <20260203140030.36921-1-trintaeoitogc@gmail.com>
Date: Tue,  3 Feb 2026 11:00:30 -0300
From: Guilherme Giacomo Simoes <trintaeoitogc@...il.com>
To: agruenba@...hat.com
Cc: gfs2@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	trintaeoitogc@...il.com
Subject: Re: [RESEND PATCH] gfs2: do not evict glocks with populated address spaces

Andreas Gruenbacher <agruenba@...hat.com> wrote:
> There are two GLOCK_BUG_ON() assertions in __gfs2_glock_put(). I
> assume you are talking about this one:
> 
> GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));
> 
> This should never trigger because each holder has a glock reference
> (see the gfs2_glock_hold() in __gfs2_holder_init()), and so
> gl->gl_lockref should never reach zero while there are holders.
> 
> If none of the holders has the HIF_HOLDER flag set, we don't know if
> the glock is actually locked.
Sorry, yes has two GLOCK_BUG_ON() assertions. I talk about the second
GLOCK_BUG_ON on __gfs2_glock_put(): 
`GLOCK_BUG_ON(gl, !mapping_empty(mapping))`. 

NOT ABOUT `GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders));` (the first
GLOCK_BUG_ON())

The dump_stack() indicates a memory pressure and the
gfs2_glock_put_eventually() on fs/gfs2/super.c is called.
But when the __gfs2_glock_put() was called, the glock was has a private folios. 
I test by this way:
```
struct address_space *mapping = ...;
pgoff_t index;
struct folio *folio;
xa_for_each(&mapping->i_pages, index, folio) {
	if (folio_test_private(folio)) 
		pr_err("I have private folios")
}
```

And, I can see the glock is about metadata:
`gl->gl_name.ln_type != LM_TYPE_INODE`

the truncate_inode_pages_final() failed silently when the folio is private.

I guess maybe evict metadata (or locked) glock is not a good idea.

Thanks, Guilherme

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ