Skip to content
  1. Sep 30, 2013
  2. Sep 28, 2013
  3. Sep 27, 2013
  4. Sep 25, 2013
    • Chuansheng Liu's avatar
      kernel/reboot.c: re-enable the function of variable reboot_default · e2f0b88e
      Chuansheng Liu authored
      
      
      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: default avatarLi Fei <fei.li@intel.com>
      Signed-off-by: default avatarliu chuansheng <chuansheng.liu@intel.com>
      Acked-by: default avatarRobin Holt <robinmholt@linux.com>
      Cc: <stable@vger.kernel.org>	[3.11.x]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e2f0b88e
    • Konstantin Khlebnikov's avatar
      audit: fix endless wait in audit_log_start() · 8ac1c8d5
      Konstantin Khlebnikov authored
      
      
      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: default avatarKonstantin 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8ac1c8d5
    • Michal Hocko's avatar
      watchdog: update watchdog_thresh properly · 9809b18f
      Michal Hocko authored
      
      
      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: default avatarMichal Hocko <mhocko@suse.cz>
      Acked-by: default avatarDon 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: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9809b18f
    • Michal Hocko's avatar
      watchdog: update watchdog attributes atomically · 359e6fab
      Michal Hocko authored
      
      
      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: default avatarMichal Hocko <mhocko@suse.cz>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Acked-by: default avatarDon Zickus <dzickus@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      359e6fab
  5. Sep 20, 2013
  6. Sep 16, 2013
  7. Sep 13, 2013
  8. Sep 12, 2013
  9. Sep 11, 2013
Loading