* [PATCH] XArray: revert (unintentional?) behavior change
@ 2025-03-22 2:17 Tamir Duberstein
2025-03-22 4:37 ` Andrew Morton
2025-03-22 21:13 ` Matthew Wilcox
0 siblings, 2 replies; 7+ messages in thread
From: Tamir Duberstein @ 2025-03-22 2:17 UTC (permalink / raw)
To: Andrew Morton, Matthew Wilcox, Stephen Rothwell
Cc: linux-kernel, linux-fsdevel, linux-mm, Tamir Duberstein
Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
to xas_lock and friends"), fixing test failures in check_xa_alloc.
Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Before this change:
BUG at xa_alloc_index:57
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc7-next-20250321-00001-gf45bb5d4b2e8 #854 NONE
Hardware name: linux,dummy-virt (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0x40/0x84
dump_stack+0x18/0x24
xa_alloc_index+0x118/0x15c
check_xa_alloc_1+0x114/0x6e8
check_xa_alloc+0x24/0x78
xarray_checks+0x58/0xd4
do_one_initcall+0x74/0x168
do_initcall_level+0x8c/0xac
do_initcalls+0x54/0x94
do_basic_setup+0x18/0x24
kernel_init_freeable+0xb8/0x120
kernel_init+0x20/0x198
ret_from_fork+0x10/0x20
BUG at xa_alloc_index:57
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc7-next-20250321-00001-gf45bb5d4b2e8 #854 NONE
Hardware name: linux,dummy-virt (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0x40/0x84
dump_stack+0x18/0x24
xa_alloc_index+0x118/0x15c
check_xa_alloc_1+0x120/0x6e8
check_xa_alloc+0x24/0x78
xarray_checks+0x58/0xd4
do_one_initcall+0x74/0x168
do_initcall_level+0x8c/0xac
do_initcalls+0x54/0x94
do_basic_setup+0x18/0x24
kernel_init_freeable+0xb8/0x120
kernel_init+0x20/0x198
ret_from_fork+0x10/0x20
BUG at xa_erase_index:62
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc7-next-20250321-00001-gf45bb5d4b2e8 #854 NONE
Hardware name: linux,dummy-virt (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0x40/0x84
dump_stack+0x18/0x24
xa_erase_index+0xb0/0xd8
check_xa_alloc_1+0x12c/0x6e8
check_xa_alloc+0x24/0x78
xarray_checks+0x58/0xd4
do_one_initcall+0x74/0x168
do_initcall_level+0x8c/0xac
do_initcalls+0x54/0x94
do_basic_setup+0x18/0x24
kernel_init_freeable+0xb8/0x120
kernel_init+0x20/0x198
ret_from_fork+0x10/0x20
BUG at xa_erase_index:62
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.14.0-rc7-next-20250321-00001-gf45bb5d4b2e8 #854 NONE
Hardware name: linux,dummy-virt (DT)
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0x40/0x84
dump_stack+0x18/0x24
xa_erase_index+0xb0/0xd8
check_xa_alloc_1+0x160/0x6e8
check_xa_alloc+0x24/0x78
xarray_checks+0x58/0xd4
do_one_initcall+0x74/0x168
do_initcall_level+0x8c/0xac
do_initcalls+0x54/0x94
do_basic_setup+0x18/0x24
kernel_init_freeable+0xb8/0x120
kernel_init+0x20/0x198
ret_from_fork+0x10/0x20
XArray: 6782365 of 6782369 tests passed
---
lib/xarray.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/xarray.c b/lib/xarray.c
index 261814d170d8..638c4c90e5b2 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -2380,6 +2380,7 @@ void xa_destroy(struct xarray *xa)
unsigned long flags;
void *entry;
+ xas.xa_node = NULL;
xas_lock_irqsave(&xas, flags);
entry = xa_head_locked(xa);
RCU_INIT_POINTER(xa->xa_head, NULL);
---
base-commit: 9388ec571cb1adba59d1cded2300eeb11827679c
change-id: 20250321-xarray-fix-destroy-274090a7a18b
Best regards,
--
Tamir Duberstein <tamird@gmail.com>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 2:17 [PATCH] XArray: revert (unintentional?) behavior change Tamir Duberstein
@ 2025-03-22 4:37 ` Andrew Morton
2025-03-22 10:34 ` Stephen Rothwell
` (2 more replies)
2025-03-22 21:13 ` Matthew Wilcox
1 sibling, 3 replies; 7+ messages in thread
From: Andrew Morton @ 2025-03-22 4:37 UTC (permalink / raw)
To: Tamir Duberstein
Cc: Matthew Wilcox, Stephen Rothwell, linux-kernel, linux-fsdevel,
linux-mm
On Fri, 21 Mar 2025 22:17:08 -0400 Tamir Duberstein <tamird@gmail.com> wrote:
> Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
> to xas_lock and friends"), fixing test failures in check_xa_alloc.
>
> Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
Thanks.
6684aba0780d appears to be only in linux-next. It has no Link: and my
efforts to google its origin story failed. Help?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 4:37 ` Andrew Morton
@ 2025-03-22 10:34 ` Stephen Rothwell
2025-03-22 10:37 ` Christophe Leroy
2025-03-22 16:21 ` Pedro Falcato
2 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-03-22 10:34 UTC (permalink / raw)
To: Andrew Morton
Cc: Tamir Duberstein, Matthew Wilcox, linux-kernel, linux-fsdevel,
linux-mm
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hi Andrew,
On Fri, 21 Mar 2025 21:37:33 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Fri, 21 Mar 2025 22:17:08 -0400 Tamir Duberstein <tamird@gmail.com> wrote:
>
> > Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
> > to xas_lock and friends"), fixing test failures in check_xa_alloc.
> >
> > Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
>
> Thanks.
>
> 6684aba0780d appears to be only in linux-next. It has no Link: and my
> efforts to google its origin story failed. Help?
Its been sitting in Matthew's xarray tree
(git://git.infradead.org/users/willy/xarray.git#main) since Sep 24 2024
and linux-next since then.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 4:37 ` Andrew Morton
2025-03-22 10:34 ` Stephen Rothwell
@ 2025-03-22 10:37 ` Christophe Leroy
2025-03-22 16:21 ` Pedro Falcato
2 siblings, 0 replies; 7+ messages in thread
From: Christophe Leroy @ 2025-03-22 10:37 UTC (permalink / raw)
To: Andrew Morton, Tamir Duberstein
Cc: Matthew Wilcox, Stephen Rothwell, linux-kernel, linux-fsdevel,
linux-mm
Le 22/03/2025 à 05:37, Andrew Morton a écrit :
> On Fri, 21 Mar 2025 22:17:08 -0400 Tamir Duberstein <tamird@gmail.com> wrote:
>
>> Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
>> to xas_lock and friends"), fixing test failures in check_xa_alloc.
>>
>> Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
>
> Thanks.
>
> 6684aba0780d appears to be only in linux-next. It has no Link: and my
> efforts to google its origin story failed. Help?
>
Apparently comes from git://git.infradead.org/users/willy/xarray.git
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 4:37 ` Andrew Morton
2025-03-22 10:34 ` Stephen Rothwell
2025-03-22 10:37 ` Christophe Leroy
@ 2025-03-22 16:21 ` Pedro Falcato
2 siblings, 0 replies; 7+ messages in thread
From: Pedro Falcato @ 2025-03-22 16:21 UTC (permalink / raw)
To: Andrew Morton
Cc: Tamir Duberstein, Matthew Wilcox, Stephen Rothwell, linux-kernel,
linux-fsdevel, linux-mm
On Fri, Mar 21, 2025 at 09:37:33PM -0700, Andrew Morton wrote:
> On Fri, 21 Mar 2025 22:17:08 -0400 Tamir Duberstein <tamird@gmail.com> wrote:
>
> > Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
> > to xas_lock and friends"), fixing test failures in check_xa_alloc.
> >
> > Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
>
> Thanks.
>
> 6684aba0780d appears to be only in linux-next. It has no Link: and my
> efforts to google its origin story failed. Help?
>
It was added back in september to willy's tree due to an XFS data corruption bug.
See https://lore.kernel.org/linux-mm/ZvLhrF5lj3x596Qm@casper.infradead.org/ and
https://git.infradead.org/?p=users/willy/xarray.git;a=commitdiff;h=6684aba0780da9f505c202f27e68ee6d18c0aa66.
--
Pedro
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 2:17 [PATCH] XArray: revert (unintentional?) behavior change Tamir Duberstein
2025-03-22 4:37 ` Andrew Morton
@ 2025-03-22 21:13 ` Matthew Wilcox
2025-03-24 14:45 ` Tamir Duberstein
1 sibling, 1 reply; 7+ messages in thread
From: Matthew Wilcox @ 2025-03-22 21:13 UTC (permalink / raw)
To: Tamir Duberstein
Cc: Andrew Morton, Stephen Rothwell, linux-kernel, linux-fsdevel,
linux-mm
On Fri, Mar 21, 2025 at 10:17:08PM -0400, Tamir Duberstein wrote:
> Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
> to xas_lock and friends"), fixing test failures in check_xa_alloc.
>
> Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
This doesn't fix anything. The first failure is:
#6 0x0000555555649979 in XAS_INVALID (xas=xas@entry=0x7ffff4a003a0)
at ../shared/linux/../../../../include/linux/xarray.h:1434
#7 0x000055555564f545 in check_xas_retry (xa=xa@entry=0x55555591ba00 <array>)
--Type <RET> for more, q to quit, c to continue without paging--
at ../../../lib/test_xarray.c:131
#8 0x0000555555663869 in xarray_checks () at ../../../lib/test_xarray.c:2221
#9 0x00005555556639ab in xarray_tests () at xarray.c:15
That has nothing to do with xa_destroy(). What on earth are you doing?
Anyway, I'm at LSFMM and it'a Saturday. I shan't be looking at this
until the 27th. There's clearly no urgency since you're the first one
to notice in six months.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] XArray: revert (unintentional?) behavior change
2025-03-22 21:13 ` Matthew Wilcox
@ 2025-03-24 14:45 ` Tamir Duberstein
0 siblings, 0 replies; 7+ messages in thread
From: Tamir Duberstein @ 2025-03-24 14:45 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Andrew Morton, Stephen Rothwell, linux-kernel, linux-fsdevel,
linux-mm
On Sat, Mar 22, 2025 at 5:13 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Fri, Mar 21, 2025 at 10:17:08PM -0400, Tamir Duberstein wrote:
> > Partially revert commit 6684aba0780d ("XArray: Add extra debugging check
> > to xas_lock and friends"), fixing test failures in check_xa_alloc.
> >
> > Fixes: 6684aba0780d ("XArray: Add extra debugging check to xas_lock and friends")
>
> This doesn't fix anything. The first failure is:
>
> #6 0x0000555555649979 in XAS_INVALID (xas=xas@entry=0x7ffff4a003a0)
> at ../shared/linux/../../../../include/linux/xarray.h:1434
> #7 0x000055555564f545 in check_xas_retry (xa=xa@entry=0x55555591ba00 <array>)
> --Type <RET> for more, q to quit, c to continue without paging--
> at ../../../lib/test_xarray.c:131
> #8 0x0000555555663869 in xarray_checks () at ../../../lib/test_xarray.c:2221
> #9 0x00005555556639ab in xarray_tests () at xarray.c:15
That's not what I see when I boot a kernel with CONFIG_TEST_XARRAY=y.
> That has nothing to do with xa_destroy(). What on earth are you doing?
I'm running the kernel in a VM on arm64. What are you doing?
> Anyway, I'm at LSFMM and it'a Saturday. I shan't be looking at this
> until the 27th. There's clearly no urgency since you're the first one
> to notice in six months.
Sure. I misunderstood the purpose of linux-next, thinking that if a
commit is in there then it will soon head to mainline. I realize now
this isn't the case.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-03-24 14:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-22 2:17 [PATCH] XArray: revert (unintentional?) behavior change Tamir Duberstein
2025-03-22 4:37 ` Andrew Morton
2025-03-22 10:34 ` Stephen Rothwell
2025-03-22 10:37 ` Christophe Leroy
2025-03-22 16:21 ` Pedro Falcato
2025-03-22 21:13 ` Matthew Wilcox
2025-03-24 14:45 ` Tamir Duberstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).