git: DragonFly_RELEASE_4_6 kernel - Add workaround for improper yield in ACPI path

Matthew Dillon dillon at crater.dragonflybsd.org
Mon Aug 8 10:55:18 PDT 2016


commit 16fba839f0006543f5abf5aff8882d19e47f465a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Mon Aug 8 10:46:35 2016 -0700

    kernel - Add workaround for improper yield in ACPI path
    
    * For now add a workaround for an improper yield that can occur indirectly
      via the ACPI path.  The problem is that the ACPI contrib code can hold
      a spinlock across a kmalloc() call.
    
    * The ACPI code, in particular AcpiOsAcquireLock(), uses a spin lock.  At
      the same time it MUST use a spinlock because it might be called from
      the idle thread.  But it also appears that the code might call kmalloc()
      while holding a spinlock.
    
      The kmalloc path ACPI calls is with M_INTWAIT, which reduces the chance
      that kmalloc might try to block.  However, kmalloc is used to execute
      staged kfrees which can create a sequence:
    
      kmalloc -> kmem_slab_free -> (vm system) ->
      vm_object_page_remove_callback -> lwkt_user_yield().

Summary of changes:
 sys/kern/lwkt_thread.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/16fba839f0006543f5abf5aff8882d19e47f465a


-- 
DragonFly BSD source repository


More information about the Commits mailing list