Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel 5.16.12 & 5.15.25 & 5.10.103 issue with /aufs/fsctx.c #9

Closed
peabee opened this issue Mar 6, 2022 · 14 comments
Closed

kernel 5.16.12 & 5.15.25 & 5.10.103 issue with /aufs/fsctx.c #9

peabee opened this issue Mar 6, 2022 · 14 comments

Comments

@peabee
Copy link

peabee commented Mar 6, 2022

An issue has arisen with kernel 5.16.12 patched with aufs and used in Puppy Linux.
The issue was not present in kernel 5.16.7
A system crash occurs when initial shutdown occurs and a new persistent user save area should be created
The crash message mentions au_fsctx_parse_monolithic
which is a function in aufs/fsctx.c

IMG2_20220306

@peabee peabee changed the title kernel 5.16.12 issue with /mnt/sdc1/kernels/5.16/kernel-kit/aufs_sources/fs/aufs/fsctx.c kernel 5.16.12 issue with /aufs/fsctx.c Mar 6, 2022
@peabee peabee changed the title kernel 5.16.12 issue with /aufs/fsctx.c kernel 5.16.12 & 5.15.25 issue with /aufs/fsctx.c Mar 6, 2022
@peabee
Copy link
Author

peabee commented Mar 6, 2022

Kernel 5.15.25 also crashes on shutdown.

@sfjro
Copy link
Owner

sfjro commented Mar 6, 2022 via email

@sfjro
Copy link
Owner

sfjro commented Mar 6, 2022 via email

@sfjro
Copy link
Owner

sfjro commented Mar 6, 2022 via email

@peabee
Copy link
Author

peabee commented Mar 7, 2022

My apologies for the blank message - I accidentally hit the button before completing the entry - sorry.
I believe that I have done a build of 5.16.12 with the patch you have suggested, but sadly the crash still occurs.
The crash report says:

BUG: kernel NULL pointer dereference
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page

@sfjro
Copy link
Owner

sfjro commented Mar 7, 2022 via email

@peabee
Copy link
Author

peabee commented Mar 7, 2022

Yes - thank you - with the 2nd patch the crashes stop......... kernel 5.16.12 :-))
I can't apply the patch to the 5.15.25 kernel due to the way it is built....
I also didn't check whether 5.10 is also affected........ but can do so if needed

static int au_fsctx_parse_monolithic(struct fs_context *fc, void *data)
{
	int err;
	unsigned int u;
	char *str;
	struct au_fsctx_opts *a;

	err = 0;
	if (!fc || !data)
	goto out;
	a = fc->fs_private;
	str = data;
	AuDbg("str %s\n", str);
	while (str) {
		u = is_colonopt(str);
		if (u)
			str[u] = '=';
		str = strchr(str, ',');
		if (!str)
			break;
		str++;
	}
	str = data;
	AuDbg("str %s\n", str);

	err = generic_parse_monolithic(fc, str);
	AuTraceErr(err);
	au_fsctx_dump(&a->opts);

out:
	return err;
}

@peabee
Copy link
Author

peabee commented Mar 7, 2022

Have now checked - 5.10.103 also needs the patch

@peabee peabee changed the title kernel 5.16.12 & 5.15.25 issue with /aufs/fsctx.c kernel 5.16.12 & 5.15.25 & 5.10.103 issue with /aufs/fsctx.c Mar 7, 2022
@sfjro
Copy link
Owner

sfjro commented Mar 7, 2022 via email

@peabee
Copy link
Author

peabee commented Mar 7, 2022

# cat DOTconfig-5.16.12-lxpup64 | grep AUFS
CONFIG_AUFS_FS=y
CONFIG_AUFS_BRANCH_MAX_127=y
# CONFIG_AUFS_BRANCH_MAX_511 is not set
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
CONFIG_AUFS_SBILIST=y
CONFIG_AUFS_HNOTIFY=y
CONFIG_AUFS_HFSNOTIFY=y
CONFIG_AUFS_EXPORT=y
CONFIG_AUFS_INO_T_64=y
CONFIG_AUFS_XATTR=y
# CONFIG_AUFS_FHSM is not set
# CONFIG_AUFS_RDU is not set
# CONFIG_AUFS_DIRREN is not set
# CONFIG_AUFS_SHWH is not set
# CONFIG_AUFS_BR_RAMFS is not set
# CONFIG_AUFS_BR_FUSE is not set
# CONFIG_AUFS_BR_HFSPLUS is not set
CONFIG_AUFS_BDEV_LOOP=y
# CONFIG_AUFS_DEBUG is not set

CONFIG_AUFS_DEBUG is not set

If I send you another patch, kindly would you test it?

Certainly

@sfjro
Copy link
Owner

sfjro commented Mar 9, 2022 via email

@peabee
Copy link
Author

peabee commented Mar 9, 2022

And the one-liner patch solved the problem.
But not on your side. I can't understand the situation. So shamelessly
I'd ask you again try the first one-liner patch please.

Dear @sfjro
My sincere apologies - I do not know what happened but I must not have applied the one-liner patch correctly somehow!!!

I can confirm, following a rebuild, that 5.6.12, with the one-liner patch, does NOT crash.

Very sorry to have confused matters
Regards
@peabee

@sfjro
Copy link
Owner

sfjro commented Mar 9, 2022 via email

@peabee peabee closed this as completed Mar 10, 2022
sfjro added a commit to sfjro/aufs-linux that referenced this issue Mar 14, 2022
The parameter "void *data" is NULL in unmounting.

Reported-by: PB on github
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
See-also: sfjro/aufs-standalone#9
@sfjro
Copy link
Owner

sfjro commented Mar 14, 2022 via email

kwavnet pushed a commit to avnet-embedded/linux-yocto that referenced this issue Nov 18, 2022
commit 25f5c5fdcb1b6c2a47f58b59c74547538b7b7c2a aufs5-standalone upstream.

The parameter "void *data" is NULL in unmounting.

Reported-by: PB on github
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
See-also: sfjro/aufs-standalone#9
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants