1. 19 10月, 2013 1 次提交
    • K
      alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist · 98d6f4dd
      KOSAKI Motohiro 提交于
      Fedora Ruby maintainer reported latest Ruby doesn't work on Fedora Rawhide
      on ARM. (http://bugs.ruby-lang.org/issues/9008)
      
      Because of, commit 1c6b39ad (alarmtimers: Return -ENOTSUPP if no
      RTC device is present) intruduced to return ENOTSUPP when
      clock_get{time,res} can't find a RTC device. However this is incorrect.
      
      First, ENOTSUPP isn't exported to userland (ENOTSUP or EOPNOTSUP are the
      closest userland equivlents).
      
      Second, Posix and Linux man pages agree that clock_gettime and
      clock_getres should return EINVAL if clk_id argument is invalid.
      While the arugment that the clockid is valid, but just not supported
      on this hardware could be made, this is just a technicality that
      doesn't help userspace applicaitons, and only complicates error
      handling.
      
      Thus, this patch changes the code to use EINVAL.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: stable <stable@vger.kernel.org>  #3.0 and up
      Reported-by: NVit Ondruch <v.ondruch@tiscali.cz>
      Signed-off-by: NKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      [jstultz: Tweaks to commit message to include full rational]
      Signed-off-by: NJohn Stultz <john.stultz@linaro.org>
      98d6f4dd
  2. 10 10月, 2013 2 次提交
  3. 02 10月, 2013 1 次提交
    • S
      tick: broadcast: Deny per-cpu clockevents from being broadcast sources · 245a3496
      Soren Brinkmann 提交于
      On most ARM systems the per-cpu clockevents are truly per-cpu in
      the sense that they can't be controlled on any other CPU besides
      the CPU that they interrupt. If one of these clockevents were to
      become a broadcast source we will run into a lot of trouble
      because the broadcast source is enabled on the first CPU to go
      into deep idle (if that CPU suffers from FEAT_C3_STOP) and that
      could be a different CPU than what the clockevent is interrupting
      (or even worse the CPU that the clockevent interrupts could be
      offline).
      
      Theoretically it's possible to support per-cpu clockevents as the
      broadcast source but so far we haven't needed this and supporting
      it is rather complicated. Let's just deny the possibility for now
      until this becomes a reality (let's hope it never does!).
      Signed-off-by: NSoren Brinkmann <soren.brinkmann@xilinx.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: NMichal Simek <michal.simek@xilinx.com>
      245a3496
  4. 30 9月, 2013 2 次提交
    • K
      nohz: Drop generic vtime obsolete dependency on CONFIG_64BIT · ff3fb254
      Kevin Hilman 提交于
      The CONFIG_64BIT requirement on vtime can finally be removed
      since we now depend on HAVE_VIRT_CPU_ACCOUNTING_GEN which
      already takes care of the arch ability to handle nsecs based
      cputime_t safely.
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Arm Linux <linux-arm-kernel@lists.infradead.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      ff3fb254
    • K
      vtime: Add HAVE_VIRT_CPU_ACCOUNTING_GEN Kconfig · 554b0004
      Kevin Hilman 提交于
      With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit. In order
      to use that feature, arch code should be audited to ensure there are no
      races in concurrent read/write of cputime_t. For example,
      reading/writing 64-bit cputime_t on some 32-bit arches may require
      multiple accesses for low and high value parts, so proper locking
      is needed to protect against concurrent accesses.
      
      Therefore, add CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN which arches can
      enable after they've been audited for potential races.
      
      This option is automatically enabled on 64-bit platforms.
      
      Feature requested by Frederic Weisbecker.
      Signed-off-by: NKevin Hilman <khilman@linaro.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Arm Linux <linux-arm-kernel@lists.infradead.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      554b0004
  5. 29 9月, 2013 1 次提交
  6. 27 9月, 2013 1 次提交
  7. 25 9月, 2013 4 次提交
    • C
      kernel/reboot.c: re-enable the function of variable reboot_default · e2f0b88e
      Chuansheng Liu 提交于
      Commit 1b3a5d02 ("reboot: move arch/x86 reboot= handling to generic
      kernel") did some cleanup for reboot= command line, but it made the
      reboot_default inoperative.
      
      The default value of variable reboot_default should be 1, and if command
      line reboot= is not set, system will use the default reboot mode.
      
      [akpm@linux-foundation.org: fix comment layout]
      Signed-off-by: NLi Fei <fei.li@intel.com>
      Signed-off-by: Nliu chuansheng <chuansheng.liu@intel.com>
      Acked-by: NRobin Holt <robinmholt@linux.com>
      Cc: <stable@vger.kernel.org>	[3.11.x]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e2f0b88e
    • K
      audit: fix endless wait in audit_log_start() · 8ac1c8d5
      Konstantin Khlebnikov 提交于
      After commit 82919919 ("kernel/audit.c: avoid negative sleep
      durations") audit emitters will block forever if userspace daemon cannot
      handle backlog.
      
      After the timeout the waiting loop turns into busy loop and runs until
      daemon dies or returns back to work.  This is a minimal patch for that
      bug.
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Luiz Capitulino <lcapitulino@redhat.com>
      Cc: Richard Guy Briggs <rgb@redhat.com>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: Chuck Anderson <chuck.anderson@oracle.com>
      Cc: Dan Duval <dan.duval@oracle.com>
      Cc: Dave Kleikamp <dave.kleikamp@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8ac1c8d5
    • M
      watchdog: update watchdog_thresh properly · 9809b18f
      Michal Hocko 提交于
      watchdog_tresh controls how often nmi perf event counter checks per-cpu
      hrtimer_interrupts counter and blows up if the counter hasn't changed
      since the last check.  The counter is updated by per-cpu
      watchdog_hrtimer hrtimer which is scheduled with 2/5 watchdog_thresh
      period which guarantees that hrtimer is scheduled 2 times per the main
      period.  Both hrtimer and perf event are started together when the
      watchdog is enabled.
      
      So far so good.  But...
      
      But what happens when watchdog_thresh is updated from sysctl handler?
      
      proc_dowatchdog will set a new sampling period and hrtimer callback
      (watchdog_timer_fn) will use the new value in the next round.  The
      problem, however, is that nobody tells the perf event that the sampling
      period has changed so it is ticking with the period configured when it
      has been set up.
      
      This might result in an ear ripping dissonance between perf and hrtimer
      parts if the watchdog_thresh is increased.  And even worse it might lead
      to KABOOM if the watchdog is configured to panic on such a spurious
      lockup.
      
      This patch fixes the issue by updating both nmi perf even counter and
      hrtimers if the threshold value has changed.
      
      The nmi one is disabled and then reinitialized from scratch.  This has
      an unpleasant side effect that the allocation of the new event might
      fail theoretically so the hard lockup detector would be disabled for
      such cpus.  On the other hand such a memory allocation failure is very
      unlikely because the original event is deallocated right before.
      
      It would be much nicer if we just changed perf event period but there
      doesn't seem to be any API to do that right now.  It is also unfortunate
      that perf_event_alloc uses GFP_KERNEL allocation unconditionally so we
      cannot use on_each_cpu() and do the same thing from the per-cpu context.
      The update from the current CPU should be safe because
      perf_event_disable removes the event atomically before it clears the
      per-cpu watchdog_ev so it cannot change anything under running handler
      feet.
      
      The hrtimer is simply restarted (thanks to Don Zickus who has pointed
      this out) if it is queued because we cannot rely it will fire&adopt to
      the new sampling period before a new nmi event triggers (when the
      treshold is decreased).
      
      [akpm@linux-foundation.org: the UP version of __smp_call_function_single ended up in the wrong place]
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Fabio Estevam <festevam@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9809b18f
    • M
      watchdog: update watchdog attributes atomically · 359e6fab
      Michal Hocko 提交于
      proc_dowatchdog doesn't synchronize multiple callers which might lead to
      confusion when two parallel callers might confuse watchdog_enable_all_cpus
      resp watchdog_disable_all_cpus (eg watchdog gets enabled even if
      watchdog_thresh was set to 0 already).
      
      This patch adds a local mutex which synchronizes callers to the sysctl
      handler.
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Acked-by: NDon Zickus <dzickus@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      359e6fab
  8. 20 9月, 2013 4 次提交
  9. 18 9月, 2013 1 次提交
  10. 16 9月, 2013 1 次提交
  11. 13 9月, 2013 7 次提交
  12. 12 9月, 2013 15 次提交