potential null dereference in sysfs_override_clocksource()
[Posted July 21, 2009 by corbet]
| From: |
| Dan Carpenter <error27-AT-gmail.com> |
| To: |
| linux-kernel-AT-vger.kernel.org |
| Subject: |
| potential null dereference in sysfs_override_clocksource() |
| Date: |
| Sun, 19 Jul 2009 16:04:48 +0300 (EAT) |
| Message-ID: |
| <alpine.DEB.2.00.0907191545580.12306@bicker> |
| Archive‑link: | |
Article |
Hello,
I am testing a source checker (http://repo.or.cz/w/smatch.git).
It found an issue in sysfs_override_clocksource() from
kernel/time/clocksource.c. If "len" is zero then "ovr" is null and
checking ovr->flags will oops on line 517.
kernel/time/clocksource.c
516 if (tick_oneshot_mode_active() &&
517 !(ovr->flags & CLOCK_SOURCE_VALID_FOR_HRES)) {
518 printk(KERN_WARNING "%s clocksource is not HRT compatible. "
regards,
dan carpenter