On 11/17/24 13:56, Xiongwei Song wrote: > It seems there is a conflict between fc0eac57d08c ("slab: pull kmem_cache_open() > into do_kmem_cache_create()") and 543c5bde72e9 ("mm/slab: Allow cache creation > to proceed even if sysfs registration fails"). The err is initialized No conflict, commit fc0eac57d08c is from 6.12-rc1, there's no merge here. I've introduced the bug by trying to improve Hyeonggon's patch and he quickly corrected me [1] so the buggy version never even made it to -next. But here I managed to resurrect it before the git pull. [1] https://lore.kernel.org/all/195242b4-5471-419a-a350-08fd246973f0@xxxxxxx/ > to -EINVAL in > the entry of do_kmem_cache_create(), sysfs_slab_add() call can assign > a value to > err normally, but the assignment to err variable has been removed in > Hyeonggon's > patch, so do_kmem_cache_create() returns -EINVAL normally. We probably can do > the following fix: > > diff --git a/mm/slub.c b/mm/slub.c > index 73eea67a306b..19630a2da8e1 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -6199,9 +6199,11 @@ int do_kmem_cache_create(struct kmem_cache *s, > const char *name, > if (!alloc_kmem_cache_cpus(s)) > goto out; > > + /* The error code is not needed any more. */ > + err = 0; > + > /* Mutex is not taken during early boot */ > if (slab_state <= UP) { > - err = 0; That was indeed the fix. > goto out; > } > > Regards, > Xiongwei > > On Sun, Nov 17, 2024 at 11:42 AM Sasha Levin <sashal@xxxxxxxxxx> wrote: >> >> On Sat, Nov 16, 2024 at 09:43:07PM +0100, Vlastimil Babka wrote: >> >On 11/16/24 16:35, Sasha Levin wrote: >> >> [ Obviously I fat-fingered it and didn't add Christian or Al ] >> > >> >I have found the problem and looks like I managed to force push an older >> >broken version of a branch, possibly due to switching between two computers. >> >Serves me well for amending in some last minute R-b tags. Doing git diff >> >@{u} to check for unexpected suprirses before pushing the result didn't help >> >this time, either I forgot or was blind. >> > >> >I have deleted the slab-for-6.13 signed tag and pushed the fixed branch only >> >to -next. Thanks a lot Sasha for catching this early and please drop the >> >merge from the for-linus tree. >> >> I've dropped the merge and tests are passing now, thanks! >> >> -- >> Thanks, >> Sasha >>