Skip to content
Commit 83a06bf5 authored by Marcelo Roberto Jimenez's avatar Marcelo Roberto Jimenez Committed by John Stultz
Browse files

RTC: Prevents a division by zero in kernel code.



This patch prevents a user space program from calling the RTC_IRQP_SET
ioctl with a negative value of frequency. Also, if this call is make
with a zero value of frequency, there would be a division by zero in the
kernel code.

[jstultz: Also initialize irq_freq to 1 to catch other divbyzero issues]

CC: Alessandro Zummo <a.zummo@towertech.it>
CC: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarMarcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent 9118626a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment