1. 26 1月, 2017 3 次提交
  2. 20 1月, 2017 8 次提交
  3. 19 1月, 2017 1 次提交
    • J
      HID: wacom: Fix sibling detection regression · a9ce7856
      Jason Gerecke 提交于
      Commit 345857bb ("HID: wacom: generic: Add support for sensor offsets") included
      a change to the operation and location of the call to 'wacom_add_shared_data'
      in 'wacom_parse_and_register'. The modifications included moving it higher up
      so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This
      was done to prevent a crash that would have occured when the report containing
      tablet offsets was fed into the driver with 'wacom_hid_report_raw_event'
      (specifically: the various 'wacom_wac_*_report' functions were written with the
      assumption that they would only be called once tablet setup had completed;
      'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet
      allocated).
      
      Moving the call to 'wacom_add_shared_data' effectively prevented the crash but
      also broke the sibiling detection code which assumes that the HID descriptor
      has been read and the various device_type flags set.
      
      To fix this situation, we restore the original 'wacom_add_shared_data'
      operation and location and instead implement an alternative change that can
      also prevent the crash. Specifically, we notice that the report functions
      mentioned above expect to be called only for input reports.  By adding a check,
      we can prevent feature reports (such as the offset report) from
      causing trouble.
      
      Fixes: 345857bb ("HID: wacom: generic: Add support for sensor offsets")
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Tested-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a9ce7856
  4. 18 1月, 2017 22 次提交
  5. 17 1月, 2017 6 次提交
    • M
      PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling · 4d191b1b
      Marc Zyngier 提交于
      The conversion to the new hotplug state machine introduced a regression
      where a successful hotplug registration would be treated as an error,
      effectively disabling the MSI driver forever.
      
      Fix it by doing the proper check on the return value.
      
      Fixes: 9c248f88 ("PCI/xgene-msi: Convert to hotplug state machine")
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Tested-by: NDuc Dang <dhdang@apm.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: stable@vger.kernel.org
      4d191b1b
    • J
      clocksource/exynos_mct: Clear interrupt when cpu is shut down · bc7c36ee
      Joonyoung Shim 提交于
      When a CPU goes offline a potentially pending timer interrupt is not
      cleared. When the CPU comes online again then the pending interrupt is
      delivered before the per cpu clockevent device is initialized. As a
      consequence the tick interrupt handler dereferences a NULL pointer.
      
      [   51.251378] Unable to handle kernel NULL pointer dereference at virtual address 00000040
      [   51.289348] task: ee942d00 task.stack: ee960000
      [   51.293861] PC is at tick_periodic+0x38/0xb0
      [   51.298102] LR is at tick_handle_periodic+0x1c/0x90
      
      Clear the pending interrupt in the cpu dying path.
      
      Fixes: 56a94f13 ("clocksource: exynos_mct: Avoid blocking calls in the cpu hotplug notifier")
      Reported-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: cw00.choi@samsung.com
      Cc: daniel.lezcano@linaro.org
      Cc: stable@vger.kernel.org
      Cc: javier@osg.samsung.com
      Cc: kgene@kernel.org
      Cc: krzk@kernel.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1484628876-22065-1-git-send-email-jy0922.shim@samsung.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      bc7c36ee
    • C
      thermal: rockchip: fixes the conversion table · db831886
      Caesar Wang 提交于
      As Ayaka reported the thermal was abormal on rk3288 at booting time.
      thermal thermal_zone1: critical temperature reached(125 C),shutting down
      thermal thermal_zone2: critical temperature reached(125 C),shutting down
      thermal thermal_zone1: critical temperature reached(125 C),shutting down
      thermal thermal_zone2: critical temperature reached(125 C),shutting down
      ...
      The root caused by reading the invald analogic value, the value is zero
      will convert the 125 degree to trigger the critical temperature.
      Fixes it with insteading of the incorrect reading now.
      
      Fixes commit cadf29dc
      ("thermal: rockchip: optimize the conversion table")
      Reported-by: Nayaka <ayaka@soulik.info>
      Signed-off-by: NCaesar Wang <wxt@rock-chips.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      db831886
    • J
      net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV · 9577b174
      Jack Morgenstein 提交于
      When running SRIOV, warnings for SRQ LIMIT events flood the Hypervisor's
      message log when (correct, normally operating) apps use SRQ LIMIT events
      as a trigger to post WQEs to SRQs.
      
      Add more information to the existing debug printout for SRQ_LIMIT, and
      output the warning messages only for the SRQ CATAS ERROR event.
      
      Fixes: acba2420 ("mlx4_core: Add wrapper functions and comm channel and slave event support to EQs")
      Fixes: e0debf9c ("mlx4_core: Reduce warning message for SRQ_LIMIT event to debug level")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9577b174
    • J
      net/mlx4_core: Fix when to save some qp context flags for dynamic VST to VGT transitions · 7c3945bc
      Jack Morgenstein 提交于
      Save the qp context flags byte containing the flag disabling vlan stripping
      in the RESET to INIT qp transition, rather than in the INIT to RTR
      transition. Per the firmware spec, the flags in this byte are active
      in the RESET to INIT transition.
      
      As a result of saving the flags in the incorrect qp transition, when
      switching dynamically from VGT to VST and back to VGT, the vlan
      remained stripped (as is required for VST) and did not return to
      not-stripped (as is required for VGT).
      
      Fixes: f0f829bf ("net/mlx4_core: Add immediate activate for VGT->VST->VGT")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c3945bc
    • J
      net/mlx4_core: Fix racy CQ (Completion Queue) free · 291c566a
      Jack Morgenstein 提交于
      In function mlx4_cq_completion() and mlx4_cq_event(), the
      radix_tree_lookup requires a rcu_read_lock.
      This is mandatory: if another core frees the CQ, it could
      run the radix_tree_node_rcu_free() call_rcu() callback while
      its being used by the radix tree lookup function.
      
      Additionally, in function mlx4_cq_event(), since we are adding
      the rcu lock around the radix-tree lookup, we no longer need to take
      the spinlock. Also, the synchronize_irq() call for the async event
      eliminates the need for incrementing the cq reference count in
      mlx4_cq_event().
      
      Other changes:
      1. In function mlx4_cq_free(), replace spin_lock_irq with spin_lock:
         we no longer take this spinlock in the interrupt context.
         The spinlock here, therefore, simply protects against different
         threads simultaneously invoking mlx4_cq_free() for different cq's.
      
      2. In function mlx4_cq_free(), we move the radix tree delete to before
         the synchronize_irq() calls. This guarantees that we will not
         access this cq during any subsequent interrupts, and therefore can
         safely free the CQ after the synchronize_irq calls. The rcu_read_lock
         in the interrupt handlers only needs to protect against corrupting the
         radix tree; the interrupt handlers may access the cq outside the
         rcu_read_lock due to the synchronize_irq calls which protect against
         premature freeing of the cq.
      
      3. In function mlx4_cq_event(), we change the mlx_warn message to mlx4_dbg.
      
      4. We leave the cq reference count mechanism in place, because it is
         still needed for the cq completion tasklet mechanism.
      
      Fixes: 6d90aa5c ("net/mlx4_core: Make sure there are no pending async events when freeing CQ")
      Fixes: 225c7b1f ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters")
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NMatan Barak <matanb@mellanox.com>
      Signed-off-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      291c566a