git: kernel - cli interlock with critcount in interrupt assembly

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Jul 24 22:01:18 PDT 2016


commit ae18e11d61f5cb1b3d4f1ecc8c70eff9bdd31df0
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Jul 24 21:44:33 2016 -0700

    kernel - cli interlock with critcount in interrupt assembly
    
    * Disable interrupts when decrementing the critical section count
      and gd_intr_nesting_level, just prior to jumping into doreti.
      This prevents a stacking interrupt from occurring in this roughly
      10-instruction window.
    
    * While limited stacking is not really a problem, this closes a very
      small and unlikely window where multiple device interrupts could
      stack excessively and run the kernel thread out of stack space.
      (unlikely that it has ever happened in real life, but becoming more
      likely as some modern devices are capable of much higher interrupt
      rates).

Summary of changes:
 sys/platform/pc64/apic/apic_vector.s | 3 +++
 1 file changed, 3 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/ae18e11d61f5cb1b3d4f1ecc8c70eff9bdd31df0


-- 
DragonFly BSD source repository


More information about the Commits mailing list