RE: [PATCH] sysctl: add bound to panic_timeout to prevent overflow

2020-07-10 Thread charley.ashbringer
> On Thu, Jul 09, 2020 at 08:31:39PM -0700, Randy Dunlap wrote: > > > +/* this is needed for setting boundery for panic_timeout to prevent > > > +it from overflow*/ > > > > boundary (or max value) overflow */ > > > > > +static int panic_time_max = INT_MAX / 1000; >

Re: [PATCH] sysctl: add bound to panic_timeout to prevent overflow

2020-07-10 Thread Matthew Wilcox
On Thu, Jul 09, 2020 at 08:31:39PM -0700, Randy Dunlap wrote: > > +/* this is needed for setting boundery for panic_timeout to prevent it > > from overflow*/ > > boundary (or max value) > overflow */ > > > +static int panic_time_max = INT_M

Re: [PATCH] sysctl: add bound to panic_timeout to prevent overflow

2020-07-09 Thread Randy Dunlap
On 7/9/20 8:22 PM, Changming Liu wrote: > Function panic() in kernel/panic.c will use panic_timeout > multiplying 1000 as a loop boundery. So this multiplication boundary. > can overflow when panic_timeout is greater than (INT_MAX/1000). > And this results in a zero-d