1. 05 Jul, 2016 1 commit
    • Lv Zheng's avatar
      ACPICA: Namespace: Fix namespace/interpreter lock ordering · 45209046
      Lv Zheng authored
      There is a lock order issue in acpi_load_tables(). The namespace lock
      is held before holding the interpreter lock.
      
      With ACPI_MUTEX_DEBUG enabled in the kernel, this is printed to the
      log during boot:
      
        [    0.885699] ACPI Error: Invalid acquire order: Thread 405884224 owns [ACPI_MTX_Namespace], wants [ACPI_MTX_Interpreter] (20160422/utmutex-263)
        [    0.885881] ACPI Error: Could not acquire AML Interpreter mutex (20160422/exutils-95)
        [    0.893846] ACPI Error: Mutex [0x0] is not acquired, cannot release (20160422/utmutex-326)
        [    0.894019] ACPI Error: Could not release AML Interpreter mutex (20160422/exutils-133)
      
      The issue has been introduced by the following commit:
      
        Commit: 2f38b1b1
        ACPICA Commit: bfe03ffcde8ed56a7eae38ea0b188aeb12f9c52e
        Subject: ACPICA: Namespace: Fix a regression that MLC support triggers
                 dead lock in dynamic table loading
      
      Which fixed a deadlock issue for acpi_ns_load_table() in
      acpi_ex_add_table() but didn't take care of the lock order in
      acpi_ns_load_table() correctly.
      
      Originally (before the above commit), ACPICA used the
      namespace/interpreter locks in the following 2 key code
      paths:
      
       1. Table loading:
       acpi_ns_load_table
      	L(Namespace)
      		acpi_ns_parse_table
      			acpi_ns_one_complete_parse
      	U(Namespace)
       2. Object evaluation:
       acpi_ns_evaluate
      	L(Interpreter)
      	acpi_ps_execute_method
      		U(Interpreter)
      		acpi_ns_load_table
      			L(Namespace)
      			U(Namespace)
      		acpi_ev_initialize_region
      			L(Namespace)
      			U(Namespace)
      		address_space.setup
      			L(Namespace)
      			U(Namespace)
      		address_space.handler
      			L(Namespace)
      			U(Namespace)
      		acpi_os_wait_semaphore
      		acpi_os_acquire_mutex
      		acpi_os_sleep
      		L(Interpreter)
      	U(Interpreter)
      
      During runtime, while acpi_ns_evaluate is called, the lock order is
      always Interpreter -> Namespace.
      
      In turn, the problematic commit acquires the locks in the following
      order:
      
       3. Table loading:
       acpi_ns_load_table
      	L(Namespace)
      		acpi_ns_parse_table
      		L(Interpreter)
      			acpi_ns_one_complete_parse
      		U(Interpreter)
      	U(Namespace)
      
      To fix the lock order issue, move the interpreter lock to
      acpi_ns_load_table() to ensure the lock order correctness:
      
       4. Table loading:
       acpi_ns_load_table
      	L(Interpreter)
      	L(Namespace)
      		acpi_ns_parse_table
      			acpi_ns_one_complete_parse
      	U(Namespace)
      	U(Interpreter)
      
      However, this doesn't fix the current design issues related to the
      namespace lock. For example, we can notice that in acpi_ns_evaluate(),
      outside of acpi_ns_load_table(), the namespace objects may be created
      by the named object creation control methods. And the creation of
      the method-owned namespace objects are not locked by the namespace
      lock. This patch doesn't try to fix such kind of existing issues.
      
      Fixes: 2f38b1b1 (ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic table loading)
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      45209046
  2. 21 Jun, 2016 1 commit
  3. 15 Jun, 2016 1 commit
  4. 01 Jun, 2016 1 commit
    • Lv Zheng's avatar
      ACPICA / Hardware: Fix old register check in acpi_hw_get_access_bit_width() · 7f9bef9d
      Lv Zheng authored
      The address check in acpi_hw_get_access_bit_width() should be byte width
      based, not bit width based. This patch fixes this mistake.
      
      For those who want to review acpi_hw_access_bit_width(), here is the
      concerns and the design details of the function:
      
      It is supposed that the GAS Address field should be aligned to the byte
      width indicated by the GAS AccessSize field. Similarly, for the old non
      GAS register, it is supposed that its Address should be aligned to its
      Length.
      
      For the "AccessSize = 0 (meaning ANY)" case, we try to return the maximum
      instruction width (64 for MMIO or 32 for PIO) or the user expected access
      bit width (64 for acpi_read()/acpi_write() or 32 for acpi_hw_read()/
      acpi_hw_write()) and it is supposed that the GAS Address field should
      always be aligned to the maximum expected access bit width (otherwise it
      can't be accessed using ANY access bit width).
      
      The problem is in acpi_tb_init_generic_address(), where the non GAS
      register's Length is converted into the GAS BitWidth field, its Address is
      converted into the GAS Address field, and the GAS AccessSize field is left
      0 but most of the registers actually cannot be accessed using "ANY"
      accesses.
      
      As a conclusion, when AccessSize = 0 (ANY), the Address should either be
      aligned to the BitWidth (wrong conversion) or aligned to 32 for PIO or 64
      for MMIO (real GAS). Since currently, max_bit_width is 32, then:
      1. BitWidth for the wrong conversion is 8,16,32; and
      2. The Address of the real GAS should always be aligned to 8,16,32.
      The address alignment check to exclude false matched real GAS is not
      necessary. Thus this patch fixes the issue by removing the address
      alignment check.
      
      On the other hand, we in fact could use a simpler check of
      "reg->bit_width < max_bit_width" to exclude the "BitWidth=64 PIO" case that
      may be issued from acpi_read()/acpi_write() in the future.
      
      Fixes: b314a172 (ACPICA: Hardware: Add optimized access bit width support)
      Reported-and-tested-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Acked-by: default avatarMike Marshall <hubcap@omnibond.com>
      Suggested-by: default avatarJan Beulich <jbeulich@suse.com>
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      7f9bef9d
  5. 05 May, 2016 14 commits
  6. 04 May, 2016 1 commit
  7. 01 May, 2016 2 commits
  8. 30 Apr, 2016 6 commits
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 1b46bac6
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "A few more powerpc fixes for 4.6:
      
         - cxl: Keep IRQ mappings on context teardown from Michael Neuling
      
         - cxl: Poll for outstanding IRQs when detaching a context from
           Michael Neuling
      
         - Wire up preadv2 and pwritev2 syscalls from Rui Salvaterra"
      
      * tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc: wire up preadv2 and pwritev2 syscalls
        cxl: Poll for outstanding IRQs when detaching a context
        cxl: Keep IRQ mappings on context teardown
      1b46bac6
    • Linus Torvalds's avatar
      Merge tag 'edac_fix_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp · 65c4cbeb
      Linus Torvalds authored
      Pull EDAC fix from Borislav Petkov:
       "Make sure sb_edac and i7core_edac do not terminate MCE processing on
        the decoding callchain prematurely"
      
      * tag 'edac_fix_for_4.6' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
        EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback
      65c4cbeb
    • Linus Torvalds's avatar
      Merge tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · b49a5195
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "One revert of a recent cpufreq commit that introduced a regression and
        a fix for intel_pstate's Turbo Activation Ratio handling code.
      
        Specifics:
      
         - Revert cpufreq commit that attempted to fix a problem in the
           ondemand/conservative governor code, but did that incorrectly and
           introduced another problem instead (Rafael Wysocki).
      
         - Fix incorrect decoding of MSR contents related to the Turbo
           Activation Ratio (TAR) handling in the intel_pstate driver
           (Srinivas Pandruvada)"
      
      * tag 'pm+acpi-4.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: intel_pstate: Fix processing for turbo activation ratio
        Revert "cpufreq: governor: Fix negative idle_time when configured with CONFIG_HZ_PERIODIC"
      b49a5195
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.6-rc4' of git://git.linaro.org/people/ulf.hansson/mmc · a8feb782
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here are a two MMC host fixes:
      
        - sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs
      
        - sunxi: Disable eMMC HS-DDR for Allwinner A80"
      
      * tag 'mmc-v4.6-rc4' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: sunxi: Disable eMMC HS-DDR (MMC_CAP_1_8V_DDR) for Allwinner A80
        mmc: sdhci-acpi: Reduce Baytrail eMMC/SD/SDIO hangs
      a8feb782
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · b9cc335f
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A few fixes all over the place:
      
        radeon is probably the biggest standout, it's a fix for screen
        corruption or hung black outputs so I thought it was worth pulling in.
      
        Otherwise some amdgpu power control fixes, some misc vmwgfx fixes, one
        etnaviv fix, one virtio-gpu fix, two DP MST fixes, and a single TTM
        fix"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/vmwgfx: Fix order of operation
        drm/vmwgfx: use vmw_cmd_dx_cid_check for query commands.
        drm/vmwgfx: Enable SVGA_3D_CMD_DX_SET_PREDICATION
        drm/amdgpu: disable vm interrupts with vm_fault_stop=2
        drm/amdgpu: print a message if ATPX dGPU power control is missing
        Revert "drm/amdgpu: disable runtime pm on PX laptops without dGPU power control"
        drm/radeon: fix vertical bars appear on monitor (v2)
        drm/ttm: fix kref count mess in ttm_bo_move_to_lru_tail
        drm/virtio: send vblank event after crtc updates
        drm/dp/mst: Restore primary hub guid on resume
        drm/dp/mst: Get validated port ref in drm_dp_update_payload_part1()
        drm/etnaviv: don't move linear memory window on 3D cores without MC2.0
      b9cc335f
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma · 925d96a0
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "Final set of -rc fixes for 4.6.
      
        I've collected up a number of patches that are all pretty small with
        the exception of only a couple.  The hfi1 driver has a number of
        important patches, and it is what really drives the line count of this
        pull request up.  These are all small and I've got this kernel built
        and running in the test lab (I have most of the hardware, I think nes
        is the only thing in this patch set that I can't say I've personally
        tested and have up and running).
      
        Summary:
      
         - A number of collected fixes for oopses, memory corruptions,
           deadlocks, etc.  All of these fixes are small (many only 5-10
           lines), obvious, and tested.
      
         - Fix for the security issue related to the use of write for
           bi-directional communications"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
        RDMA/nes: don't leak skb if carrier down
        IB/security: Restrict use of the write() interface
        IB/hfi1: Use kernel default llseek for ui device
        IB/hfi1: Don't attempt to free resources if initialization failed
        IB/hfi1: Fix missing lock/unlock in verbs drain callback
        IB/rdmavt: Fix send scheduling
        IB/hfi1: Prevent unpinning of wrong pages
        IB/hfi1: Fix deadlock caused by locking with wrong scope
        IB/hfi1: Prevent NULL pointer deferences in caching code
        MAINTAINERS: Update iser/isert maintainer contact info
        IB/mlx5: Expose correct max_sge_rd limit
        RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
        iw_cxgb4: handle draining an idle qp
        iw_cxgb3: initialize ibdev.iwcm->ifname for port mapping
        iw_cxgb4: initialize ibdev.iwcm->ifname for port mapping
        IB/core: Don't drain non-existent rq queue-pair
        IB/core: Fix oops in ib_cache_gid_set_default_gid
      925d96a0
  9. 29 Apr, 2016 13 commits