RE: [PATCH v2] panic: prevent panic_timeout * 1000 from overflow

2020-07-15 Thread charley.ashbringer
> > Since panic_timeout is an integer passed-in through sysctl, > > the loop boundary panic_timeout * 1000 could overflow and > > result in a zero-delay panic when panic_timeout is greater > > than INT_MAX/1000. > > > > Fix this by moving 1000 to the left, also in case i/1000 > > might never be gre

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; >