1. 30 6月, 2017 3 次提交
  2. 14 6月, 2017 10 次提交
  3. 13 6月, 2017 2 次提交
    • T
      posix-timers: Handle relative posix-timers correctly · 67edab48
      Thomas Gleixner 提交于
      The recent rework of the posix timer internals broke the magic posix
      mechanism, which requires that relative timers are not affected by
      modifications of the underlying clock. That means relative CLOCK_REALTIME
      timers cannot use CLOCK_REALTIME, because that can be set and adjusted. The
      underlying hrtimer switches the clock for these timers to CLOCK_MONOTONIC.
      
      That still works, but reading the remaining time of such a timer has been
      broken in the rework. The old code used the hrtimer internals directly and
      avoided the posix clock callbacks. Now common_timer_get() uses the
      underlying kclock->timer_get() callback, which is still CLOCK_REALTIME
      based. So the remaining time of such a timer is calculated against the
      wrong time base.
      
      Handle it by switching the k_itimer->kclock pointer according to the
      resulting hrtimer mode. k_itimer->it_clock still contains CLOCK_REALTIME
      because the timer might be set with ABSTIME later and then it needs to
      switch back to the realtime posix clock implementation.
      
      Fixes: eae1c4ae ("posix-timers: Make use of cancel/arm callbacks")
      Reported-by: NAndrei Vagin <avagin@virtuozzo.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com
      67edab48
    • T
      posix-timers: Zero out oldval itimerspec · 5c7a3a3d
      Thomas Gleixner 提交于
      The recent posix timer rework moved the clearing of the itimerspec to the
      real syscall implementation, but forgot that the kclock->timer_get() is
      used by timer_settime() as well. That results in an uninitialized variable
      and bogus values returned to user space.
      
      Add the missing memset to timer_settime().
      
      Fixes: eabdec04 ("posix-timers: Zero settings value in common code")
      Reported-by: NAndrei Vagin <avagin@virtuozzo.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Link: http://lkml.kernel.org/r/20170609201156.GB21491@outlook.office365.com
      5c7a3a3d
  4. 12 6月, 2017 1 次提交
  5. 04 6月, 2017 13 次提交
  6. 27 5月, 2017 1 次提交
  7. 15 4月, 2017 6 次提交
  8. 02 3月, 2017 1 次提交
  9. 26 12月, 2016 2 次提交
    • T
      ktime: Cleanup ktime_set() usage · 8b0e1953
      Thomas Gleixner 提交于
      ktime_set(S,N) was required for the timespec storage type and is still
      useful for situations where a Seconds and Nanoseconds part of a time value
      needs to be converted. For anything where the Seconds argument is 0, this
      is pointless and can be replaced with a simple assignment.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      8b0e1953
    • T
      ktime: Get rid of the union · 2456e855
      Thomas Gleixner 提交于
      ktime is a union because the initial implementation stored the time in
      scalar nanoseconds on 64 bit machine and in a endianess optimized timespec
      variant for 32bit machines. The Y2038 cleanup removed the timespec variant
      and switched everything to scalar nanoseconds. The union remained, but
      become completely pointless.
      
      Get rid of the union and just keep ktime_t as simple typedef of type s64.
      
      The conversion was done with coccinelle and some manual mopping up.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      2456e855
  10. 25 12月, 2016 1 次提交