LKML Archive on
help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <>
To: Tetsuo Handa <>
Subject: Re: kernel panic: EXT4-fs (device loop0): panic forced after error
Date: Sun, 6 May 2018 16:30:47 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, May 06, 2018 at 11:40:10PM +0900, Tetsuo Handa wrote:
> > We could add a full kernel-mode fsck which gets run before mount ---
> > the question is how much complexity we want to add.  If SELinux is
> > enabled, then we have to check xattr consinsistency, etc., etc.
> You are thinking too complicated. I'm not asking for kernel-mode fsck.

That is the logical outcome of what you are asking for.  There will
*always* be a point after which where we can't atomically unwind the
mount, and we have to proceed.  And after that point, when we detect
an inconsistency all we can do is what the system administrator
requested that we do.  Sure, for this particular case, we can
significantly add more complexity and decrease the maintainability of
the code paths involved.  But there will always be another case
(e.g,. xattr's being read by SELinux or IMA) that will happen during
the mount, and are we expected to catch all of those cases?

We do catch a lot of cases where we refuse the mount and complain that
the file system is badly corrupted.  This just doesn't happen to be
one of them.

> I'm just suggesting that mount() request returns an error to the caller
> (and the administrator invokes fsck etc. as needed).
> We are fixing bugs which occur during mount operation (e.g.

These are different because there are kernel OOPS or warning messages.
This is neither a kernel OOPS or a WARN_ON or BUG_ON.

> And extX filesystem is different from other filesystems that it invokes
> error action specified by errors= parameter rather than return an error to
> the caller.

Syzkaller (or anyone else) can mount the file system with
errors=continue or errors=remount-ro if it wants to override the
requested behavior of the flag in the superblock which is manipulated
by tune2fs.

						- Ted

  reply	other threads:[~2018-05-06 20:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-06  0:57 syzbot
2018-05-06  2:24 ` Theodore Y. Ts'o
2018-05-06  5:03   ` Tetsuo Handa
2018-05-06  9:15     ` Dmitry Vyukov
2018-05-06 13:50       ` Theodore Y. Ts'o
2018-05-06 13:31     ` Theodore Y. Ts'o
2018-05-06 14:40       ` Tetsuo Handa
2018-05-06 20:30         ` Theodore Y. Ts'o [this message]
2018-05-14  9:12           ` Dmitry Vyukov
2018-06-12 14:01             ` Dmitry Vyukov

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: kernel panic: EXT4-fs (device loop0): panic forced after error' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).