Skip to content

mdio: fix segmentation fault in dump operation#46

Merged
wkz merged 1 commit intowkz:masterfrom
abajk:dump-segfault
Oct 10, 2025
Merged

mdio: fix segmentation fault in dump operation#46
wkz merged 1 commit intowkz:masterfrom
abajk:dump-segfault

Conversation

@abajk
Copy link
Copy Markdown
Contributor

@abajk abajk commented Oct 5, 2025

Return an ENOMEM error when the buffer is too small to perform the operation.

Before:
$ mdio mt7530-0 0x05:31 dump 0x0+512
Segmentation fault

After:
$ mdio mt7530-0 0x05:31 dump 0x0+512
ERROR: Dump operation failed (-12)

Fixes: 8824887 ("mdio: Add common dump operation to read ranges of registers")
Signed-off-by: Aleksander Jan Bajkowski olek2@wp.pl

Return an ENOMEM error when the buffer is too small to
perform the operation.

Before:
$ mdio mt7530-0 0x05:31 dump 0x0+512
Segmentation fault

After:
$ mdio mt7530-0 0x05:31 dump 0x0+512
ERROR: Dump operation failed (-12)

Fixes: 8824887 ("mdio: Add common dump operation to read ranges of registers")
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
@wkz wkz merged commit b98e2f0 into wkz:master Oct 10, 2025
2 checks passed
@wkz
Copy link
Copy Markdown
Owner

wkz commented Oct 10, 2025

Thanks 🙏

@abajk abajk deleted the dump-segfault branch October 10, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants