Re: [syzbot] [mptcp?] general protection fault in proc_scheduler

Al Viro
2025-01-04T20:09:16Z

On Sat, Jan 04, 2025 at 07:53:22PM +0100, Eric Dumazet wrote:
> I do think this is a bug in process accounting, not in networking.
>
> It might make sense to output a record on a regular file, but probably
> not on any other files.
>
> diff --git a/kernel/acct.c b/kernel/acct.c
> index 179848ad33e978a557ce695a0d6020aa169177c6..a211305cb930f6860d02de7f45ebd260ae03a604
> 100644
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -495,6 +495,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)
> const struct cred *orig_cred;
> struct file *file = acct->file;
>
> + if (S_ISREG(file_inode(file)->i_mode))
> + return;

Wait, what? OK, that will stop attempts to write there - or to any
other regular file.

If you modify that to
if (!S_ISREG(...))
you seem to have intended, it won't break the normal behaviour but it
won't help with sysctls.