Re: [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number

2020-11-06 Thread Petr Mladek
On Thu 2020-11-05 19:14:27, Matteo Croce wrote: > On Thu, Nov 5, 2020 at 7:09 PM Petr Mladek wrote: > > > + if (reboot_cpu >= num_possible_cpus()) { > > > + pr_err("Ignoring the CPU number in reboot= > > > option. " > > > +

Re: [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number

2020-11-05 Thread Matteo Croce
On Thu, Nov 5, 2020 at 7:09 PM Petr Mladek wrote: > > + if (reboot_cpu >= num_possible_cpus()) { > > + pr_err("Ignoring the CPU number in reboot= > > option. " > > +"CPU %d exceeds possible cpu number > > %d\n",

Re: [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number

2020-11-05 Thread Petr Mladek
On Tue 2020-11-03 22:40:24, Matteo Croce wrote: > From: Matteo Croce > > Limit the CPU number to num_possible_cpus(), because setting it > to a value lower than INT_MAX but higher than NR_CPUS produces the > following error on reboot and shutdown: > > BUG: unable to handle page fault for add

[PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number

2020-11-03 Thread Matteo Croce
From: Matteo Croce Limit the CPU number to num_possible_cpus(), because setting it to a value lower than INT_MAX but higher than NR_CPUS produces the following error on reboot and shutdown: BUG: unable to handle page fault for address: 90ab1bb0 #PF: supervisor read access in kern