All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Thomas Backlund <tmb@tmb.nu>, Jan Kara <jack@suse.cz>,
	Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	stable <stable@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Shuah Khan <shuah@kernel.org>,
	patches@kernelci.org, lkft-triage@lists.linaro.org,
	Pavel Machek <pavel@denx.de>, Jon Hunter <jonathanh@nvidia.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Slade Watkins <slade@sladewatkins.com>
Subject: Re: [PATCH 5.15 000/251] 5.15.47-rc2 review
Date: Tue, 14 Jun 2022 11:51:35 -0700	[thread overview]
Message-ID: <CAHk-=wix7+mGzS-hANyk7DZsZ1NgGMHjPzSQKggEomYrRCrP_Q@mail.gmail.com> (raw)
In-Reply-To: <bd80cd0d-a364-4ebd-2a89-933f79eaf4c7@tmb.nu>

On Tue, Jun 14, 2022 at 11:20 AM Thomas Backlund <tmb@tmb.nu> wrote:
>
> I "think" this is the suggested fix:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs.git/commit/?h=for_next&id=46b6418e26c7c26f98ff9c2c2310bce5ae2aa4dd

Ugh, this is just too ugly for words.

That's not a fix. That's a "hide the problem" patch.

Now, admittedly clearly the "hide the problem" code already existed,
and was just moved earlier, but I really think this whole "we're
calling __mark_inode_dirty() on an inode that isn't even *initialized*
yet" is a much deeper issue, and shouldn't have some hacky work-around
in __mark_inode_dirty() that just happens to make it work.

I don't mind that patch per se - moving the code is fine.

But I *do* mind the patch when the reason is to hide that wrong
ordering of operations.

Now, maybe a proper fix might be to say that new_inode_pseudo() should
always initialize i_state to I_DIRTY_ALL or something like that. The
comment already says that they cannot participate in writeback, so
maybe they should be disabled that way (ie a pseudo inode is always
dirty and marking it dirty does nothing).

And then you get rid of the noop_backing_dev_info entirely.

Or just make sure that noop_backing_dev_info is fully initialized
before it's used.

Because I think the real problem here is that things have a pointer to
an uninitialized backing_dev_info.

Hmm? Jan?

                   Linus

  reply	other threads:[~2022-06-14 19:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 17:47 [PATCH 5.15 000/251] 5.15.47-rc2 review Thomas Backlund
2022-06-14 18:51 ` Linus Torvalds [this message]
2022-06-14 19:00   ` Linus Torvalds
2022-06-15 11:00     ` Jan Kara
2022-06-15 13:38       ` Jan Kara
2022-06-15 18:00         ` Guenter Roeck
2022-06-15 21:47           ` Jan Kara
2022-06-16  8:04         ` Suzuki K Poulose
2022-06-15 10:04   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2022-06-13 18:19 Greg Kroah-Hartman
2022-06-13 21:00 ` Florian Fainelli
2022-06-14  3:06 ` Shuah Khan
2022-06-14  3:32 ` Fox Chen
2022-06-14 10:21 ` Sudip Mukherjee
2022-06-14 15:36 ` Guenter Roeck
2022-06-14 16:58   ` Allen Pais
2022-06-14 17:08   ` Guenter Roeck
2022-06-14 17:12     ` Greg Kroah-Hartman
2022-06-14 19:18 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHk-=wix7+mGzS-hANyk7DZsZ1NgGMHjPzSQKggEomYrRCrP_Q@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jack@suse.cz \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=lkft-triage@lists.linaro.org \
    --cc=patches@kernelci.org \
    --cc=pavel@denx.de \
    --cc=shuah@kernel.org \
    --cc=slade@sladewatkins.com \
    --cc=stable@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tmb@tmb.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.