From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>,
"Christian Thießen via B4 Relay"
<devnull+christian.thiessen.airbus.com@kernel.org>
Cc: "Ahmad Fatoum" <a.fatoum@pengutronix.de>,
"Christian Thießen" <christian.thiessen@airbus.com>
Subject: Re: [PATCH v2] mtd: Make mtd_erase fail gracefully if CONFIG_MTD_WRITE is off
Date: Thu, 04 Sep 2025 07:39:27 +0200 [thread overview]
Message-ID: <175696436719.3134230.7997692965017379708.b4-ty@pengutronix.de> (raw)
In-Reply-To: <20250903-mtd-erase-enosys-v2-1-7b7f28302f25@airbus.com>
On Wed, 03 Sep 2025 16:31:21 +0200, Christian Thießen via B4 Relay wrote:
> When CONFIG_MTD_WRITE is unset, the mtd->_erase member of partition
> devices does not get initialized, so it remains NULL.
> However when running ubiattach on an UBI partition, mtd_erase() still
> gets called, tries to call mtd->_erase and crashes. Make it fail
> gracefully by returning ENOSYS ("Function not implemented") instead.
>
>
> [...]
Applied, thanks!
[1/1] mtd: Make mtd_erase fail gracefully if CONFIG_MTD_WRITE is off
https://git.pengutronix.de/cgit/barebox/commit/?id=b530b3d7ebf8 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
prev parent reply other threads:[~2025-09-04 5:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-03 14:31 Christian Thießen via B4 Relay
2025-09-04 5:39 ` Sascha Hauer [this message]
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=175696436719.3134230.7997692965017379708.b4-ty@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=christian.thiessen@airbus.com \
--cc=devnull+christian.thiessen.airbus.com@kernel.org \
/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