Skip to content
  1. Oct 19, 2018
    • Lukas Wunner's avatar
      genirq: Fix race on spurious interrupt detection · 746a923b
      Lukas Wunner authored
      
      
      Commit 1e77d0a1 ("genirq: Sanitize spurious interrupt detection of
      threaded irqs") made detection of spurious interrupts work for threaded
      handlers by:
      
      a) incrementing a counter every time the thread returns IRQ_HANDLED, and
      b) checking whether that counter has increased every time the thread is
         woken.
      
      However for oneshot interrupts, the commit unmasks the interrupt before
      incrementing the counter.  If another interrupt occurs right after
      unmasking but before the counter is incremented, that interrupt is
      incorrectly considered spurious:
      
      time
       |  irq_thread()
       |    irq_thread_fn()
       |      action->thread_fn()
       |      irq_finalize_oneshot()
       |        unmask_threaded_irq()            /* interrupt is unmasked */
       |
       |                  /* interrupt fires, incorrectly deemed spurious */
       |
       |    atomic_inc(&desc->threads_handled); /* counter is incremented */
       v
      
      This is observed with a hi3110 CAN controller receiving data at high volume
      (from a separate machine sending with "cangen -g 0 -i -x"): The controller
      signals a huge number of interrupts (hundreds of millions per day) and
      every second there are about a dozen which are deemed spurious.
      
      In theory with high CPU load and the presence of higher priority tasks, the
      number of incorrectly detected spurious interrupts might increase beyond
      the 99,900 threshold and cause disablement of the interrupt.
      
      In practice it just increments the spurious interrupt count. But that can
      cause people to waste time investigating it over and over.
      
      Fix it by moving the accounting before the invocation of
      irq_finalize_oneshot().
      
      [ tglx: Folded change log update ]
      
      Fixes: 1e77d0a1 ("genirq: Sanitize spurious interrupt detection of threaded irqs")
      Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Mathias Duckeck <m.duckeck@kunbus.de>
      Cc: Akshay Bhat <akshay.bhat@timesys.com>
      Cc: Casey Fitzpatrick <casey.fitzpatrick@timesys.com>
      Cc: stable@vger.kernel.org # v3.16+
      Link: https://lkml.kernel.org/r/1dfd8bbd16163940648045495e3e9698e63b50ad.1539867047.git.lukas@wunner.de
      746a923b
    • Yangtao Li's avatar
      softirq: Fix typo in __do_softirq() comments · e45506ac
      Yangtao Li authored
      
      
      s/s/as
      
      [ mingo: Also add a missing 'the', add proper punctuation and clarify what 'swap' means here. ]
      
      Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: alexander.levin@verizon.com
      Cc: frederic@kernel.org
      Cc: joel@joelfernandes.org
      Cc: paulmck@linux.vnet.ibm.com
      Cc: rostedt@goodmis.org
      Link: http://lkml.kernel.org/r/20181018142133.12341-1-tiny.windzz@gmail.com
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e45506ac
  2. Oct 09, 2018
  3. Oct 06, 2018
  4. Oct 03, 2018
  5. Oct 02, 2018
  6. Oct 01, 2018
  7. Sep 30, 2018