Conversation
royzah
requested review from
Donny9,
xiaoxiang781216 and
yamt
as code owners
September 30, 2026 10:55
xiaoxiang781216
approved these changes
Sep 30, 2026
royzah
force-pushed
the
mtd-erase-sectors
branch
from
September 30, 2026 12:35
7a327f5 to
21e39db
Compare
Laczen
approved these changes
Sep 30, 2026
The ioctl passed the erase to the parent unchecked, so an erase from the last block on reached the next partition. part_erase() already bounds it. Signed-off-by: Royyan Zahir <royzah@gmail.com>
royzah
force-pushed
the
mtd-erase-sectors
branch
from
October 1, 2026 01:29
21e39db to
cc05517
Compare
Contributor
Author
|
Two approvals and CI is green, could a committer merge this one when there's a moment? Thanks! |
Contributor
but need two committer/pmc approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please adhere to Contributing Guidelines.
Summary
MTDIOC_ERASESECTORSon a partition went straight to the parent with no bound, so an erase from the last block on hit the next partition.part_erase()already checks it.Call
part_erase(). Plus thenxstylefixes in the file.Impact
MTD partitions. An erase past the end of a partition fails instead of erasing the next one.
Testing
Host: Ubuntu 24.04, x86_64. Builds and QEMU runs in
ghcr.io/apache/nuttx/apache-nuttx-ci-linux(QEMU 6.2, Arm GNU GCC 13.2, xPack RISC-V GCC 14.3). Hardware: i.MX93 (Cortex-A55), PX4 kernel build.i.MX93, 64 MB FlexSPI NOR in partitions,
MTDIOC_ERASESECTORSfrom the block past the end of a 7680-block partition:-ENXIOi.MX93, PX4 kernel build, this series applied:
tests isolationtools/checkpatch.shclean.