From: "Theodore Ts'o" <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: Andreas Dilger <adilger@dilger.ca>,
Jason Yan <yanaijie@huawei.com>, "Theodore Ts'o" <tytso@mit.edu>
Subject: [PATCH 0/3] ext4: clean up error handling
Date: Thu, 27 Apr 2023 23:15:59 -0400 [thread overview]
Message-ID: <20230428031602.242297-1-tytso@mit.edu> (raw)
The recent code cleanup of __ext4_fill_super() resulted in a bug
reported by Syzkaller. When I investigated this issue, I found that
the bug was caused by a fragile and partially redundant way error
codes were set to be returned by the __ext4_fill_super() function.
The first patch fixes the bug found by Syzkaller, and the second and
third patch cleans up the error handling in __ext4_fill_super() and
__ext4_multi_mount_protect().
Andreas, please take a look at the second patch, as it changes the
error codes returned in various cases when the MMP feature prevents
the file system from being mounted and other failure cases. For
example, when another system has the file system mounted, mount will
now return EBUSY instead EINVAL. In other cases, if a memory
allocation fails, mount will now return ENOMEM instead of EINVAL. I
think this is an improvement, but there might be some userspace code
that might get confused by this. Since Lustre users tend to be most
common users of the MMP feature, I'd appreciate your review of this
patch.
Theodore Ts'o (3):
ext4: fix lost error code reporting in __ext4_fill_super()
ext4: reflect error codes from ext4_multi_mount_protect() to its
callers
ext4: clean up error handling in __ext4_fill_super()
fs/ext4/mmp.c | 9 ++++++-
fs/ext4/super.c | 68 +++++++++++++++++++++++++++++--------------------
2 files changed, 48 insertions(+), 29 deletions(-)
--
2.31.0
next reply other threads:[~2023-04-28 3:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 3:15 Theodore Ts'o [this message]
2023-04-28 3:16 ` [PATCH 1/3] ext4: fix lost error code reporting in __ext4_fill_super() Theodore Ts'o
2023-04-28 3:35 ` Jason Yan
2023-04-28 3:16 ` [PATCH 2/3] ext4: reflect error codes from ext4_multi_mount_protect() to its callers Theodore Ts'o
2023-04-28 3:39 ` Jason Yan
2023-04-28 3:16 ` [PATCH 3/3] ext4: clean up error handling in __ext4_fill_super() Theodore Ts'o
2023-04-28 6:08 ` Jason Yan
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=20230428031602.242297-1-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=yanaijie@huawei.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox