From: Matteo Croce mcroce@microsoft.com
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.
v1->v2: As Petr suggested, don't force base 10 in simple_strtoul(), so hex values are accepted as well.
Matteo Croce (2): reboot: fix overflow parsing reboot cpu number reboot: fix parsing of reboot cpu number
kernel/reboot.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)