1. 07 8月, 2015 2 次提交
  2. 06 8月, 2015 7 次提交
  3. 05 8月, 2015 5 次提交
  4. 04 8月, 2015 9 次提交
    • R
      xen/events/fifo: Handle linked events when closing a port · fcdf31a7
      Ross Lagerwall 提交于
      An event channel bound to a CPU that was offlined may still be linked
      on that CPU's queue.  If this event channel is closed and reused,
      subsequent events will be lost because the event channel is never
      unlinked and thus cannot be linked onto the correct queue.
      
      When a channel is closed and the event is still linked into a queue,
      ensure that it is unlinked before completing.
      
      If the CPU to which the event channel bound is online, spin until the
      event is handled by that CPU. If that CPU is offline, it can't handle
      the event, so clear the event queue during the close, dropping the
      events.
      
      This fixes the missing interrupts (and subsequent disk stalls etc.)
      when offlining a CPU.
      Signed-off-by: NRoss Lagerwall <ross.lagerwall@citrix.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      fcdf31a7
    • D
      drm/atomic-helpers: Make encoder picking more robust · 6ea76f3c
      Daniel Vetter 提交于
      We've had a few issues with atomic where subtle bugs in the encoder
      picking logic lead to accidental self-stealing of the encoder,
      resulting in a NULL connector_state->crtc in update_connector_routing
      and subsequent.
      
      Linus applied some duct-tape for an mst regression in
      
      commit 27667f47
      Author: Linus Torvalds <torvalds@linux-foundation.org>
      Date:   Wed Jul 29 22:18:16 2015 -0700
      
          i915: temporary fix for DP MST docking station NULL pointer dereference
      
      But that was incomplete (the code will still oops when debuggin is
      enabled) and mangled the state even further. So instead WARN and bail
      out as the more future-proof option.
      
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      6ea76f3c
    • D
      drm/dp-mst: Remove debug WARN_ON · 42639ba5
      Daniel Vetter 提交于
      Apparently been in there since forever and fairly easy to hit when
      hotplugging really fast. I can do that since my mst hub has a manual
      button to flick the hpd line for reprobing. The resulting WARNING spam
      isn't pretty.
      
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      42639ba5
    • D
      drm/i915: Fixup dp mst encoder selection · 459485ad
      Daniel Vetter 提交于
      In
      
      commit 8c7b5ccb
      Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Date:   Tue Apr 21 17:13:19 2015 +0300
      
          drm/i915: Use atomic helpers for computing changed flags
      
      we've switched over to the atomic version to compute the
      crtc->encoder->connector routing from the i915 variant. That one
      relies upon the ->best_encoder callback, but the i915-private version
      relied upon intel_find_encoder. Which didn't matter except for dp mst,
      where the encoder depends upon the selected crtc.
      
      Fix this functional bug by implemented a correct atomic-state based
      encoder selector for dp mst.
      
      Note that we can't get rid of the legacy best_encoder callback since
      the fbdev emulation uses that still. That means it's incorrect there
      still, but that's been the case ever since i915 dp mst support was
      merged so not a regression. Best to fix that by converting fbdev over
      to atomic too.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      459485ad
    • D
      drm/atomic-helper: Add an atomice best_encoder callback · 3b8a684b
      Daniel Vetter 提交于
      With legacy helpers all the routing was already set up when calling
      best_encoder and so could be inspected. But with atomic it's staged,
      hence we need a new atomic compliant callback for drivers which need
      to inspect the requested state and can't just decided the best encoder
      statically.
      
      This is needed to fix up i915 dp mst where we need to pick the right
      encoder depending upon the requested CRTC for the connector.
      
      v2: Don't forget to amend the kerneldoc
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Acked-by: NThierry Reding <treding@nvidia.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      3b8a684b
    • M
      dm: fix dm_merge_bvec regression on 32 bit systems · bd4aaf8f
      Mike Snitzer 提交于
      A DM regression on 32 bit systems was reported against v4.2-rc3 here:
      https://lkml.org/lkml/2015/7/29/401
      
      Fix this by reverting both commit 1c220c69 ("dm: fix casting bug in
      dm_merge_bvec()") and 148e51ba ("dm: improve documentation and code
      clarity in dm_merge_bvec").  This combined revert is done to eliminate
      the possibility of a partial revert in stable@ kernels.
      
      In hindsight the correct fix, at the time 1c220c69 was applied to fix
      the regression that 148e51ba introduced, should've been to simply revert
      148e51ba.
      Reported-by: NJosh Boyer <jwboyer@fedoraproject.org>
      Tested-by: NAdam Williamson <awilliam@redhat.com>
      Acked-by: NJoe Thornber <ejt@redhat.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Cc: stable@vger.kernel.org # 3.19+
      bd4aaf8f
    • M
      staging: vt6655: vnt_bss_info_changed check conf->beacon_rate is not NULL · 1f171240
      Malcolm Priestley 提交于
      conf->beacon_rate can be NULL on association. So check conf->beacon_rate
      
      BSS_CHANGED_BEACON_INFO needs to flagged in changed as the beacon_rate
      will appear later.
      Signed-off-by: NMalcolm Priestley <tvboxspy@gmail.com>
      Cc: <stable@vger.kernel.org> # v3.19+
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f171240
    • G
      drivers/usb: Delete XHCI command timer if necessary · ffe5adcb
      Gavin Shan 提交于
      When xhci_mem_cleanup() is called, it's possible that the command
      timer isn't initialized and scheduled. For those cases, to delete
      the command timer causes soft-lockup as below stack dump shows.
      
      The patch avoids deleting the command timer if it's not scheduled
      with the help of timer_pending().
      
      NMI watchdog: BUG: soft lockup - CPU#40 stuck for 23s! [kworker/40:1:8140]
            :
      NIP [c000000000150b30] lock_timer_base.isra.34+0x90/0xa0
      LR [c000000000150c24] try_to_del_timer_sync+0x34/0xa0
      Call Trace:
      [c000000f67c975e0] [c0000000015b84f8] mon_ops+0x0/0x8 (unreliable)
      [c000000f67c97620] [c000000000150c24] try_to_del_timer_sync+0x34/0xa0
      [c000000f67c97660] [c000000000150cf0] del_timer_sync+0x60/0x80
      [c000000f67c97690] [c00000000070ac0c] xhci_mem_cleanup+0x5c/0x5e0
      [c000000f67c97740] [c00000000070c2e8] xhci_mem_init+0x1158/0x13b0
      [c000000f67c97860] [c000000000700978] xhci_init+0x88/0x110
      [c000000f67c978e0] [c000000000701644] xhci_gen_setup+0x2b4/0x590
      [c000000f67c97970] [c0000000006d4410] xhci_pci_setup+0x40/0x190
      [c000000f67c979f0] [c0000000006b1af8] usb_add_hcd+0x418/0xba0
      [c000000f67c97ab0] [c0000000006cb15c] usb_hcd_pci_probe+0x1dc/0x5c0
      [c000000f67c97b50] [c0000000006d3ba4] xhci_pci_probe+0x64/0x1f0
      [c000000f67c97ba0] [c0000000004fe9ac] local_pci_probe+0x6c/0x130
      [c000000f67c97c30] [c0000000000e5ce8] work_for_cpu_fn+0x38/0x60
      [c000000f67c97c60] [c0000000000eacb8] process_one_work+0x198/0x470
      [c000000f67c97cf0] [c0000000000eb6ac] worker_thread+0x37c/0x5a0
      [c000000f67c97d80] [c0000000000f2730] kthread+0x110/0x130
      [c000000f67c97e30] [c000000000009660] ret_from_kernel_thread+0x5c/0x7c
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NPriya M. A <priyama2@in.ibm.com>
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ffe5adcb
    • M
      xhci: fix off by one error in TRB DMA address boundary check · 7895086a
      Mathias Nyman 提交于
      We need to check that a TRB is part of the current segment
      before calculating its DMA address.
      
      Previously a ring segment didn't use a full memory page, and every
      new ring segment got a new memory page, so the off by one
      error in checking the upper bound was never seen.
      
      Now that we use a full memory page, 256 TRBs (4096 bytes), the off by one
      didn't catch the case when a TRB was the first element of the next segment.
      
      This is triggered if the virtual memory pages for a ring segment are
      next to each in increasing order where the ring buffer wraps around and
      causes errors like:
      
      [  106.398223] xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 1
      [  106.398230] xhci_hcd 0000:00:14.0: Looking for event-dma fffd3000 trb-start fffd4fd0 trb-end fffd5000 seg-start fffd4000 seg-end fffd4ff0
      
      The trb-end address is one outside the end-seg address.
      
      Cc: <stable@vger.kernel.org>
      Tested-by: NArkadiusz Miśkiewicz <arekm@maven.pl>
      Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7895086a
  5. 03 8月, 2015 11 次提交
    • K
      thermal: Drop owner assignment from platform_driver · 6b5e38dc
      Krzysztof Kozlowski 提交于
      platform_driver does not need to set an owner because
      platform_driver_register() will set it.
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      6b5e38dc
    • A
      usb: udc: core: add device_del() call to error pathway · c93e64e9
      Alan Stern 提交于
      This patch fixes a bug in the error pathway of
      usb_add_gadget_udc_release() in udc-core.c.  If the udc registration
      fails, the gadget registration is not fully undone; there's a
      put_device(&gadget->dev) call but no device_del().
      
      CC: <stable@vger.kernel.org>
      Acked-by: NPeter Chen <peter.chen@freescale.com>
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      c93e64e9
    • N
      md/raid5: don't let shrink_slab shrink too far. · 49895bcc
      NeilBrown 提交于
      I have a report of drop_one_stripe() called from
      raid5_cache_scan() apparently finding ->max_nr_stripes == 0.
      
      This should not be allowed.
      
      So add a test to keep max_nr_stripes above min_nr_stripes.
      
      Also use a 'mask' rather than a 'mod' in drop_one_stripe
      to ensure 'hash' is valid even if max_nr_stripes does reach zero.
      
      
      Fixes: edbe83ab ("md/raid5: allow the stripe_cache to grow and shrink.")
      Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b)
      Reported-by: NTomas Papan <tomas.papan@gmail.com>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      49895bcc
    • B
      md: use kzalloc() when bitmap is disabled · b6878d9e
      Benjamin Randazzo 提交于
      In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
      mdu_bitmap_file_t called "file".
      
      5769         file = kmalloc(sizeof(*file), GFP_NOIO);
      5770         if (!file)
      5771                 return -ENOMEM;
      
      This structure is copied to user space at the end of the function.
      
      5786         if (err == 0 &&
      5787             copy_to_user(arg, file, sizeof(*file)))
      5788                 err = -EFAULT
      
      But if bitmap is disabled only the first byte of "file" is initialized
      with zero, so it's possible to read some bytes (up to 4095) of kernel
      space memory from user space. This is an information leak.
      
      5775         /* bitmap disabled, zero the first byte and copy out */
      5776         if (!mddev->bitmap_info.file)
      5777                 file->pathname[0] = '\0';
      Signed-off-by: NBenjamin Randazzo <benjamin@randazzo.fr>
      Signed-off-by: NNeilBrown <neilb@suse.com>
      b6878d9e
    • C
      thermal: exynos: Remove unused code related to platform_data on probe() · 3c19d237
      Chanwoo Choi 提交于
      This patch removes the unused code related to struct exynos_tmu_platform_data
      because exynos_tmu_probe() don't handle the struct exynos_tmu_platform_data *pdata.
      
      Test HW: Exynos4412 - Trats2 board
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Tested-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      3c19d237
    • C
      thermal: exynos: Add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF · f87e6bd3
      Chanwoo Choi 提交于
      The exynos thermal driver use the of_thermal_*() API to parse the basic data
      for thermal management from devicetree file. So, if CONFIG_EXYNOS_THERMAL is
      selected without CONFIG_THERMAL_OF, kernel can build it without any problem.
      But, exynos thermal driver is not working with following error log. This patch
      add the dependency of CONFIG_THERMAL_OF instead of CONFIG_OF.
      
      [    1.458644] get_th_reg: Cannot get trip points from of-thermal.c!
      [    1.459096] get_th_reg: Cannot get trip points from of-thermal.c!
      [    1.465211] exynos4412_tmu_initialize: No CRITICAL trip point defined at of-thermal.c!
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      f87e6bd3
    • K
      thermal: exynos: Disable the regulator on probe failure · 5f09a5cb
      Krzysztof Kozlowski 提交于
      During probe the regulator (if present) was enabled but not disabled in
      case of failure. So an unsuccessful probe lead to enabling the
      regulator which was actually not needed because the device was not
      enabled.
      
      Additionally each deferred probe lead to increase of regulator enable
      count so it would not be effectively disabled during removal of the
      device.
      
      Test HW: Exynos4412 - Trats2 board
      Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Fixes: 498d22f6 ("thermal: exynos: Support for TMU regulator defined at device tree")
      Cc: <stable@vger.kernel.org>
      Reviewed-by: NJavier Martinez Canillas <javier.martinez@collabora.co.uk>
      Signed-off-by: NLukasz Majewski <l.majewski@samsung.com>
      Tested-by: NLukasz Majewski <l.majewski@samsung.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      5f09a5cb
    • J
      thermal: power_allocator: trace the real requested power · d5f83109
      Javi Merino 提交于
      The power allocator governor uses ftrace to output a bunch of internal
      data for debugging and tuning.  Currently, the requested power it
      outputs is the "weighted" requested power, that is, what each cooling
      device has requested multiplied by the cooling device weight.  It is
      more useful to trace the real request, without any weight being
      applied.
      
      This commit only affects the data traced, there is no functional change.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      d5f83109
    • V
      thermal: remove dangling 'weight_attr' device file · 528464ea
      Viresh Kumar 提交于
      This file isn't getting removed while we unbind a device from thermal
      zone. And this causes following messages when the device is registered
      again:
      
      WARNING: CPU: 0 PID: 2228 at /home/viresh/linux/fs/sysfs/dir.c:31 sysfs_warn_dup+0x60/0x70()
      sysfs: cannot create duplicate filename '/devices/virtual/thermal/thermal_zone0/cdev0_weight'
      Modules linked in: cpufreq_dt(+) [last unloaded: cpufreq_dt]
      CPU: 0 PID: 2228 Comm: insmod Not tainted 4.2.0-rc3-00059-g44fffd9473eb #272
      Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [<c00153e8>] (unwind_backtrace) from [<c0012368>] (show_stack+0x10/0x14)
      [<c0012368>] (show_stack) from [<c053a684>] (dump_stack+0x84/0xc4)
      [<c053a684>] (dump_stack) from [<c002284c>] (warn_slowpath_common+0x80/0xb0)
      [<c002284c>] (warn_slowpath_common) from [<c00228ac>] (warn_slowpath_fmt+0x30/0x40)
      [<c00228ac>] (warn_slowpath_fmt) from [<c012d524>] (sysfs_warn_dup+0x60/0x70)
      [<c012d524>] (sysfs_warn_dup) from [<c012d244>] (sysfs_add_file_mode_ns+0x13c/0x190)
      [<c012d244>] (sysfs_add_file_mode_ns) from [<c012d2d4>] (sysfs_create_file_ns+0x3c/0x48)
      [<c012d2d4>] (sysfs_create_file_ns) from [<c03c04a8>] (thermal_zone_bind_cooling_device+0x260/0x358)
      [<c03c04a8>] (thermal_zone_bind_cooling_device) from [<c03c2e70>] (of_thermal_bind+0x88/0xb4)
      [<c03c2e70>] (of_thermal_bind) from [<c03c10d0>] (__thermal_cooling_device_register+0x17c/0x2e0)
      [<c03c10d0>] (__thermal_cooling_device_register) from [<c03c3f50>] (__cpufreq_cooling_register+0x3a0/0x51c)
      [<c03c3f50>] (__cpufreq_cooling_register) from [<bf00505c>] (cpufreq_ready+0x44/0x88 [cpufreq_dt])
      [<bf00505c>] (cpufreq_ready [cpufreq_dt]) from [<c03d6c30>] (cpufreq_add_dev+0x4a0/0x7dc)
      [<c03d6c30>] (cpufreq_add_dev) from [<c02cd3ec>] (subsys_interface_register+0x94/0xd8)
      [<c02cd3ec>] (subsys_interface_register) from [<c03d785c>] (cpufreq_register_driver+0x10c/0x1f0)
      [<c03d785c>] (cpufreq_register_driver) from [<bf0057d4>] (dt_cpufreq_probe+0x60/0x8c [cpufreq_dt])
      [<bf0057d4>] (dt_cpufreq_probe [cpufreq_dt]) from [<c02d03e4>] (platform_drv_probe+0x44/0xa4)
      [<c02d03e4>] (platform_drv_probe) from [<c02cead8>] (driver_probe_device+0x174/0x2b4)
      [<c02cead8>] (driver_probe_device) from [<c02ceca4>] (__driver_attach+0x8c/0x90)
      [<c02ceca4>] (__driver_attach) from [<c02cd078>] (bus_for_each_dev+0x68/0x9c)
      [<c02cd078>] (bus_for_each_dev) from [<c02ce2f0>] (bus_add_driver+0x19c/0x214)
      [<c02ce2f0>] (bus_add_driver) from [<c02cf490>] (driver_register+0x78/0xf8)
      [<c02cf490>] (driver_register) from [<c0009710>] (do_one_initcall+0x8c/0x1d4)
      [<c0009710>] (do_one_initcall) from [<c05396b0>] (do_init_module+0x5c/0x1b8)
      [<c05396b0>] (do_init_module) from [<c0086490>] (load_module+0xd34/0xed8)
      [<c0086490>] (load_module) from [<c0086704>] (SyS_init_module+0xd0/0x120)
      [<c0086704>] (SyS_init_module) from [<c000f480>] (ret_fast_syscall+0x0/0x3c)
      ---[ end trace 3be0e7b7dc6e3c4f ]---
      
      Fixes: db916513 ("thermal: export weight to sysfs")
      Acked-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      528464ea
    • N
      md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies · 423f04d6
      NeilBrown 提交于
      raid1_end_read_request() assumes that the In_sync bits are consistent
      with the ->degaded count.
      raid1_spare_active updates the In_sync bit before the ->degraded count
      and so exposes an inconsistency, as does error()
      So extend the spinlock in raid1_spare_active() and error() to hide those
      inconsistencies.
      
      This should probably be part of
        Commit: 34cab6f4 ("md/raid1: fix test for 'was read error from
        last working device'.")
      as it addresses the same issue.  It fixes the same bug and should go
      to -stable for same reasons.
      
      Fixes: 76073054 ("md/raid1: clean up read_balance.")
      Cc: stable@vger.kernel.org (v3.0+)
      Signed-off-by: NNeilBrown <neilb@suse.com>
      423f04d6
    • L
      i915: temporary fix for DP MST docking station NULL pointer dereference · 27667f47
      Linus Torvalds 提交于
      Ted Ts'o reports that his Lenovo T540p ThinkPad crashes at boot if
      attached to the docking station.  This is a regression that he was able
      to bisect to commit 8c7b5ccb: "drm/i915: Use atomic helpers for
      computing changed flags:"
      
      The reason seems to be the new call to drm_atomic_helper_check_modeset()
      added to intel_modeset_compute_config(), which in turn calls
      update_connector_routing(), and somehow ends up picking a NULL crtc for
      the connector state, causing the subsequent drm_crtc_index() to OOPS.
      
      Daniel Vetter says that the fundamental issue seems to be confusion in
      the encoder selection, and this isn't the right fix, but while he chases
      down the proper fix, this at least avoids the NULL pointer dereference
      and makes Ted's docking station work again.
      Reported-bisected-and-tested-by: NTheodore Ts'o <tytso@mit.edu>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Mani Nikula <jani.nikula@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      27667f47
  6. 01 8月, 2015 6 次提交