summaryrefslogtreecommitdiffstats
path: root/kernel/itimer.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-04-12 15:16:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-04-12 15:16:26 -0700
commitccb1ec95e924a24906ef01ce6d028a8dc13dc87d (patch)
treeb16a02083ba6843fe3f2513f74a72c95d43ddccb /kernel/itimer.c
parent4a1d7544fee5e601a4e642ce2720689f90428d65 (diff)
parentd48fc63f6f3f485ed5aa9cf019d8e8e3a7d10263 (diff)
downloadlinux-ccb1ec95e924a24906ef01ce6d028a8dc13dc87d.tar.gz
linux-ccb1ec95e924a24906ef01ce6d028a8dc13dc87d.tar.bz2
linux-ccb1ec95e924a24906ef01ce6d028a8dc13dc87d.zip
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "The itimer removal one is not strictly a fix, but I really wanted to avoid a rebase of the urgent ones." * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Revert "clocksource: Load the ACPI PM clocksource asynchronously" clockevents: tTack broadcast device mode change in tick_broadcast_switch_to_oneshot() itimer: Use printk_once instead of WARN_ONCE nohz: Fix stale jiffies update in tick_nohz_restart() tick: Document TICK_ONESHOT config option proc: stats: Use arch_idle_time for idle and iowait times if available itimer: Schedule silent NULL pointer fixup in setitimer() for removal
Diffstat (limited to 'kernel/itimer.c')
-rw-r--r--kernel/itimer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/itimer.c b/kernel/itimer.c
index 22000c3db0dd..8d262b467573 100644
--- a/kernel/itimer.c
+++ b/kernel/itimer.c
@@ -284,8 +284,12 @@ SYSCALL_DEFINE3(setitimer, int, which, struct itimerval __user *, value,
if (value) {
if(copy_from_user(&set_buffer, value, sizeof(set_buffer)))
return -EFAULT;
- } else
- memset((char *) &set_buffer, 0, sizeof(set_buffer));
+ } else {
+ memset(&set_buffer, 0, sizeof(set_buffer));
+ printk_once(KERN_WARNING "%s calls setitimer() with new_value NULL pointer."
+ " Misfeature support will be removed\n",
+ current->comm);
+ }
error = do_setitimer(which, &set_buffer, ovalue ? &get_buffer : NULL);
if (error || !ovalue)