kern/53557: [patch]: kernel panic: fix for a divide by zero processor exception

Bruce Evans bde at zeta.org.au
Fri Jun 20 20:48:33 PDT 2003


On Fri, 20 Jun 2003, Christian S.J. Peron wrote:

> >Description:
> 	If root sets the kern.log_wakeups_per_second variable to 0
> 	the next time the callback for the syslog wakeup gets scheduled
> 	it will panic due to divide by zero machine exception.

Don't do that then.

There are hundreds or thousands of sysctls that may be used for much
more interesting foot shooting than a panic.  If foot shooting prevention
is required, then it should be implemented more generally starting
with simple range checks for all sysctls that set scalar values.

Bruce


More information about the freebsd-bugs mailing list