1. 14 6月, 2017 3 次提交
  2. 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
  3. 12 6月, 2017 1 次提交
  4. 04 6月, 2017 32 次提交
  5. 03 6月, 2017 2 次提交
    • L
      Merge tag 'acpi-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 104c08ba
      Linus Torvalds 提交于
      Pull ACPI fixes from Rafael Wysocki:
       "These revert one more problematic commit related to the ACPI-based
        handling of laptop lids and make some unuseful error messages coming
        from ACPICA go away.
      
        Specifics:
      
         - Revert one more commit related to the ACPI-based handling of laptop
           lids that changed the default behavior on laptops that booted with
           closed lids and introduced a regression there (Benjamin Tissoires).
      
         - Add a missing acpi_put_table() to the code implementing the
           /sys/firmware/acpi/tables interface to prevent a counter in the
           ACPICA core from overflowing (Dan Williams).
      
         - Drop error messages printed by ACPICA on acpi_get_table() reference
           counting mismatches as they need not indicate real errors at this
           point (Lv Zheng)"
      
      * tag 'acpi-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPICA: Tables: Fix regression introduced by a too early mechanism enabling
        Revert "ACPI / button: Change default behavior to lid_init_state=open"
        ACPI / sysfs: fix acpi_get_table() leak / acpi-sysfs denial of service
      104c08ba
    • L
      Merge tag 'pm-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 89af529a
      Linus Torvalds 提交于
      Pull power management fixes from Rafael Wysocki:
       "These fix two bugs in error code paths in the cpufreq core and in the
        kirkwood-cpufreq driver.
      
        Specifics:
      
         - Make cpufreq_register_driver() return an error if the ->init()
           calls fail for all CPUs to prevent non-functional drivers from
           hanging around for no reason (David Arcari).
      
         - Make kirkwood-cpufreq check the return value of
           clk_prepare_enable() (which may fail) as appropriate (Arvind
           Yadav)"
      
      * tag 'pm-4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: kirkwood-cpufreq:- Handle return value of clk_prepare_enable()
        cpufreq: cpufreq_register_driver() should return -ENODEV if init fails
      89af529a