Skip to content

fix parsing of reboot= cmdline

Matteo Croce lkml 3 versions – Applied

Status from this message: [merged] reboot-refactor-and-comment-the-cpu-selection-code.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 5 repliesApplied 3/3
  2. v22 patches 12 repliesSuperseded
  3. v12 patches 7 repliesSuperseded

Changes in v3 from the cover letter

Revert the offending commit first, then fix the other bug. CC stable

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"kernel/reboot.c+7 -141 replyApplied
2/3reboot: fix overflow parsing reboot cpu numberkernel/reboot.c+7 -03 repliesApplied
3/3reboot: refactor and comment the cpu selection codekernel/reboot.c+17 -131 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchPetr Mladek
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/3] fix parsing of reboot= cmdline

From: Matteo Croce <[email protected]>

The parsing of the reboot= cmdline has two major errors:
- a missing bound check can crash the system on reboot
- parsing of the cpu number only works if specified last

Fix both, along with a small code refactor.

v2->v3:
Revert the offending commit first, then fix the other bug. CC stable
v1->v2:
As Petr suggested, don't force base 10 in simple_strtoul(), so hex values are accepted as well.

Matteo Croce (3):
Revert "kernel/reboot.c: convert simple_strtoul to kstrtoint"
reboot: fix overflow parsing reboot cpu number
reboot: refactor and comment the cpu selection code

 kernel/reboot.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)
Signature · 1 line
2.28.0