1. 19 3月, 2018 3 次提交
    • H
      libata: Modify quirks for MX100 to limit NCQ_TRIM quirk to MU01 version · d418ff56
      Hans de Goede 提交于
      When commit 9c7be59f ("libata: Apply NOLPM quirk to Crucial MX100
      512GB SSDs") was added it inherited the ATA_HORKAGE_NO_NCQ_TRIM quirk
      from the existing "Crucial_CT*MX100*" entry, but that entry sets model_rev
      to "MU01", where as the entry adding the NOLPM quirk sets it to NULL.
      
      This means that after this commit we no apply the NO_NCQ_TRIM quirk to
      all "Crucial_CT512MX100*" SSDs even if they have the fixed "MU02"
      firmware. This commit splits the "Crucial_CT512MX100*" quirk into 2
      quirks, one for the "MU01" firmware and one for all other firmware
      versions, so that we once again only apply the NO_NCQ_TRIM quirk to the
      "MU01" firmware version.
      
      Fixes: 9c7be59f ("libata: Apply NOLPM quirk to ... MX100 512GB SSDs")
      Cc: stable@vger.kernel.org
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      d418ff56
    • H
      libata: Make Crucial BX100 500GB LPM quirk apply to all firmware versions · 3bf7b5d6
      Hans de Goede 提交于
      Commit b17e5729 ("libata: disable LPM for Crucial BX100 SSD 500GB
      drive"), introduced a ATA_HORKAGE_NOLPM quirk for Crucial BX100 500GB SSDs
      but limited this to the MU02 firmware version, according to:
      http://www.crucial.com/usa/en/support-ssd-firmware
      
      MU02 is the last version, so there are no newer possibly fixed versions
      and if the MU02 version has broken LPM then the MU01 almost certainly
      also has broken LPM, so this commit changes the quirk to apply to all
      firmware versions.
      
      Fixes: b17e5729 ("libata: disable LPM for Crucial BX100 SSD 500GB...")
      Cc: stable@vger.kernel.org
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      3bf7b5d6
    • H
      libata: Apply NOLPM quirk to Crucial M500 480 and 960GB SSDs · 62ac3f73
      Hans de Goede 提交于
      There have been reports of the Crucial M500 480GB model not working
      with LPM set to min_power / med_power_with_dipm level.
      
      It has not been tested with medium_power, but that typically has no
      measurable power-savings.
      
      Note the reporters Crucial_CT480M500SSD3 has a firmware version of MU03
      and there is a MU05 update available, but that update does not mention any
      LPM fixes in its changelog, so the quirk matches all firmware versions.
      
      In my experience the LPM problems with (older) Crucial SSDs seem to be
      limited to higher capacity versions of the SSDs (different firmware?),
      so this commit adds a NOLPM quirk for the 480 and 960GB versions of the
      M500, to avoid LPM causing issues with these SSDs.
      
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: NMartin Steigerwald <martin@lichtvoll.de>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      62ac3f73
  2. 16 3月, 2018 3 次提交
    • K
      drm/nouveau/bl: fix backlight regression · 9e75dc61
      Karol Herbst 提交于
      Fixes: 3c66c87d ("drm/nouveau/disp: remove hw-specific customisation
      of output paths")
      Suggested-by: NBen Skeggs <skeggsb@redhat.com>
      Signed-off-by: NKarol Herbst <kherbst@redhat.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      9e75dc61
    • L
      drm/nouveau/bl: Fix oops on driver unbind · 76f2e2bc
      Lukas Wunner 提交于
      Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate
      over the bl_connectors list in nouveau_backlight_exit() but skipped
      initializing it in nouveau_backlight_init().  Stacktrace for posterity:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
          IP: nouveau_backlight_exit+0x2b/0x70 [nouveau]
          nouveau_display_destroy+0x29/0x80 [nouveau]
          nouveau_drm_unload+0x65/0xe0 [nouveau]
          drm_dev_unregister+0x3c/0xe0 [drm]
          drm_put_dev+0x2e/0x60 [drm]
          nouveau_drm_device_remove+0x47/0x70 [nouveau]
          pci_device_remove+0x36/0xb0
          device_release_driver_internal+0x157/0x220
          driver_detach+0x39/0x70
          bus_remove_driver+0x51/0xd0
          pci_unregister_driver+0x2a/0xa0
          nouveau_drm_exit+0x15/0xfb0 [nouveau]
          SyS_delete_module+0x18c/0x290
          system_call_fast_compare_end+0xc/0x6f
      
      Fixes: b53ac1ee ("drm/nouveau/bl: Do not register interface if Apple GMUX detected")
      Cc: stable@vger.kernel.org # v4.10+
      Cc: Pierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      76f2e2bc
    • M
      drm/nouveau/mmu: ALIGN_DOWN correct variable · da5e45e6
      Māris Nartišs 提交于
      Commit 7110c89bb8852ff8b0f88ce05b332b3fe22bd11e ("mmu: swap out round
      for ALIGN") replaced two calls to round/rounddown with ALIGN/ALIGN_DOWN,
      but erroneously applied ALIGN_DOWN to a different variable (addr) and left
      intended variable (tail) not rounded/ALIGNed.
      
      As a result screen corruption, X lockups are observable. An example of kernel
      log of affected system with NV98 card where it was bisected:
      
      nouveau 0000:01:00.0: gr: TRAP_M2MF 00000002 [IN]
      nouveau 0000:01:00.0: gr: TRAP_M2MF 00320951 400007c0 00000000 04000000
      nouveau 0000:01:00.0: gr: 00200000 [] ch 1 [000fbbe000 DRM] subc 4 class 5039
      mthd 0100 data 00000000
      nouveau 0000:01:00.0: fb: trapped read at 0040000000 on channel 1
      [0fbbe000 DRM]
      engine 00 [PGRAPH] client 03 [DISPATCH] subclient 04 [M2M_IN] reason 00000006
      [NULL_DMAOBJ]
      
      Fixes bug 105173 ("[MCP79][Regression] Unhandled NULL pointer dereference in
      nvkm_object_unmap since kernel 4.15")
      https://bugs.freedesktop.org/show_bug.cgi?id=105173
      
      Fixes: 7110c89bb885 ("mmu: swap out round for ALIGN ")
      Tested-by: NPierre Moreau <pierre.morrow@free.fr>
      Reviewed-by: NPierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: NMaris Nartiss <maris.nartiss@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org # v4.15+
      da5e45e6
  3. 15 3月, 2018 10 次提交
    • Z
      drm/i915/gvt: fix user copy warning by whitelist workload rb_tail field · 850555d1
      Zhenyu Wang 提交于
      This is to fix warning got as:
      
      [ 6730.476938] ------------[ cut here ]------------
      [ 6730.476979] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLAB object 'gvt-g_vgpu_workload' (offset 120, size 4)!
      [ 6730.477021] WARNING: CPU: 2 PID: 441 at mm/usercopy.c:81 usercopy_warn+0x7e/0xa0
      [ 6730.477042] Modules linked in: tun(E) bridge(E) stp(E) llc(E) kvmgt(E) x86_pkg_temp_thermal(E) vfio_mdev(E) intel_powerclamp(E) mdev(E) coretemp(E) vfio_iommu_type1(E) vfio(E) kvm_intel(E) kvm(E) hid_generic(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) usbhid(E) i915(E) crc32c_intel(E) hid(E) ghash_clmulni_intel(E) pcbc(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) intel_cstate(E) idma64(E) evdev(E) virt_dma(E) iTCO_wdt(E) intel_uncore(E) intel_rapl_perf(E) intel_lpss_pci(E) sg(E) shpchp(E) mei_me(E) pcspkr(E) iTCO_vendor_support(E) intel_lpss(E) intel_pch_thermal(E) prime_numbers(E) mei(E) mfd_core(E) video(E) acpi_pad(E) button(E) binfmt_misc(E) ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc16(E) mbcache(E) jbd2(E) fscrypto(E) sd_mod(E) e1000e(E) xhci_pci(E) sdhci_pci(E)
      [ 6730.477244]  ptp(E) cqhci(E) xhci_hcd(E) pps_core(E) sdhci(E) mmc_core(E) i2c_i801(E) usbcore(E) thermal(E) fan(E)
      [ 6730.477276] CPU: 2 PID: 441 Comm: gvt workload 0 Tainted: G            E    4.16.0-rc1-gvt-staging-0213+ #127
      [ 6730.477303] Hardware name:  /NUC6i5SYB, BIOS SYSKLi35.86A.0039.2016.0316.1747 03/16/2016
      [ 6730.477326] RIP: 0010:usercopy_warn+0x7e/0xa0
      [ 6730.477340] RSP: 0018:ffffba6301223d18 EFLAGS: 00010286
      [ 6730.477355] RAX: 0000000000000000 RBX: ffff8f41caae9838 RCX: 0000000000000006
      [ 6730.477375] RDX: 0000000000000007 RSI: 0000000000000082 RDI: ffff8f41dad166f0
      [ 6730.477395] RBP: 0000000000000004 R08: 0000000000000576 R09: 0000000000000000
      [ 6730.477415] R10: ffffffffb1293fb2 R11: 00000000ffffffff R12: 0000000000000001
      [ 6730.477447] R13: ffff8f41caae983c R14: ffff8f41caae9838 R15: 00007f183ca2b000
      [ 6730.477467] FS:  0000000000000000(0000) GS:ffff8f41dad00000(0000) knlGS:0000000000000000
      [ 6730.477489] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 6730.477506] CR2: 0000559462817291 CR3: 000000028b46c006 CR4: 00000000003626e0
      [ 6730.477526] Call Trace:
      [ 6730.477537]  __check_object_size+0x9c/0x1a0
      [ 6730.477562]  __kvm_write_guest_page+0x45/0x90 [kvm]
      [ 6730.477585]  kvm_write_guest+0x46/0x80 [kvm]
      [ 6730.477599]  kvmgt_rw_gpa+0x9b/0xf0 [kvmgt]
      [ 6730.477642]  workload_thread+0xa38/0x1040 [i915]
      [ 6730.477659]  ? do_wait_intr_irq+0xc0/0xc0
      [ 6730.477673]  ? finish_wait+0x80/0x80
      [ 6730.477707]  ? clean_workloads+0x120/0x120 [i915]
      [ 6730.477722]  kthread+0x111/0x130
      [ 6730.477733]  ? _kthread_create_worker_on_cpu+0x60/0x60
      [ 6730.477750]  ? exit_to_usermode_loop+0x6f/0xb0
      [ 6730.477766]  ret_from_fork+0x35/0x40
      [ 6730.477777] Code: 48 c7 c0 20 e3 25 b1 48 0f 44 c2 41 50 51 41 51 48 89 f9 49 89 f1 4d 89 d8 4c 89 d2 48 89 c6 48 c7 c7 78 e3 25 b1 e8 b2 bc e4 ff <0f> ff 48 83 c4 18 c3 48 c7 c6 09 d0 26 b1 49 89 f1 49 89 f3 eb
      [ 6730.477849] ---[ end trace cae869c1c323e45a ]---
      
      By whitelist guest page write from workload struct allocated from kmem cache.
      Reviewed-by: NHang Yuan <hang.yuan@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      (cherry picked from commit 5627705406874df57fdfad3b4e0c9aedd3b007df)
      850555d1
    • F
      drm/i915/gvt: Correct the privilege shadow batch buffer address · ef75c685
      fred gao 提交于
      Once the ring buffer is copied to ring_scan_buffer and scanned,
      the shadow batch buffer start address is only updated into
      ring_scan_buffer, not the real ring address allocated through
      intel_ring_begin in later copy_workload_to_ring_buffer.
      
      This patch is only to set the right shadow batch buffer address
      from Ring buffer, not include the shadow_wa_ctx.
      
      v2:
      - refine some comments. (Zhenyu)
      v3:
      - fix typo in title. (Zhenyu)
      v4:
      - remove the unnecessary comments. (Zhenyu)
      - add comments in bb_start_cmd_va update. (Zhenyu)
      
      Fixes: 0a53bc07 ("drm/i915/gvt: Separate cmd scan from request allocation")
      Cc: stable@vger.kernel.org  # v4.15
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Yulei Zhang <yulei.zhang@intel.com>
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      ef75c685
    • M
      drm/amdgpu/dce: Don't turn off DP sink when disconnected · 7d617264
      Michel Dänzer 提交于
      Turning off the sink in this case causes various issues, because
      userspace expects it to stay on until it turns it off explicitly.
      
      Instead, turn the sink off and back on when a display is connected
      again. This dance seems necessary for link training to work correctly.
      
      Bugzilla: https://bugs.freedesktop.org/105308
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7d617264
    • A
      drm/amdgpu: save/restore backlight level in legacy dce code · b5e32413
      Alex Deucher 提交于
      Save/restore the backlight level scratch register in S3/S4 so the
      backlight level comes back at the previously requested level.
      
      Bug: https://bugzilla.kernel.org/show_bug.cgi?id=199047
      Fixes: 4ec6ecf4 (drm/amdgpu: drop scratch regs save and restore from S3/S4 handling)
      Acked-by: NMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      b5e32413
    • C
      drm/radeon: fix prime teardown order · 0f4f715b
      Christian König 提交于
      We unmapped imported DMA-bufs when the GEM handle was dropped, not when the
      hardware was done with the buffere.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0f4f715b
    • C
      drm/amdgpu: fix prime teardown order · 342038d9
      Christian König 提交于
      We unmapped imported DMA-bufs when the GEM handle was dropped, not when the
      hardware was done with the buffere.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      342038d9
    • S
      dm mpath: fix passing integrity data · 8c5c1473
      Steffen Maier 提交于
      After v4.12 commit e2460f2a ("dm: mark targets that pass integrity
      data"), dm-multipath, e.g. on DIF+DIX SCSI disk paths, does not support
      block integrity any more. So add it to the whitelist.
      
      This is also a pre-requisite to use block integrity with other dm layer(s)
      on top of multipath, such as kpartx partitions (dm-linear) or LVM.
      
      Also, bump target version to reflect this fix.
      
      Fixes: e2460f2a ("dm: mark targets that pass integrity data")
      Cc: <stable@vger.kernel.org> #4.12+
      Bisected-by: NFedor Loshakov <loshakov@linux.vnet.ibm.com>
      Signed-off-by: NSteffen Maier <maier@linux.vnet.ibm.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      8c5c1473
    • T
      RDMAVT: Fix synchronization around percpu_ref · 74b44bbe
      Tejun Heo 提交于
      rvt_mregion uses percpu_ref for reference counting and RCU to protect
      accesses from lkey_table.  When a rvt_mregion needs to be freed, it
      first gets unregistered from lkey_table and then rvt_check_refs() is
      called to wait for in-flight usages before the rvt_mregion is freed.
      
      rvt_check_refs() seems to have a couple issues.
      
      * It has a fast exit path which tests percpu_ref_is_zero().  However,
        a percpu_ref reading zero doesn't mean that the object can be
        released.  In fact, the ->release() callback might not even have
        started executing yet.  Proceeding with freeing can lead to
        use-after-free.
      
      * lkey_table is RCU protected but there is no RCU grace period in the
        free path.  percpu_ref uses RCU internally but it's sched-RCU whose
        grace periods are different from regular RCU.  Also, it generally
        isn't a good idea to depend on internal behaviors like this.
      
      To address the above issues, this patch removes the fast exit and adds
      an explicit synchronize_rcu().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: NDennis Dalessandro <dennis.dalessandro@intel.com>
      Cc: Mike Marciniszyn <mike.marciniszyn@intel.com>
      Cc: linux-rdma@vger.kernel.org
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      74b44bbe
    • D
      platform/x86: Fix dell driver init order · 49368c13
      Darren Hart (VMware) 提交于
      Update the initcall ordering to satisfy the following dependency
      ordering:
      
      1. DCDBAS, ACPI_WMI
      2. DELL_SMBIOS, DELL_RBTN
      3. DELL_LAPTOP, DELL_WMI
      
      By assigning them to the following initcall levels:
      
      subsys_initcall: DCDBAS, ACPI_WMI
      module_init: DELL_SMBIOS, DELL_RBTN
      late_initcall: DELL_LAPTOP, DELL_WMI
      
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Mario.Limonciello@dell.com
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      49368c13
    • D
      platform/x86: dell-smbios: Resolve dependency error on ACPI_WMI · 75073a64
      Darren Hart 提交于
      Similarly to DCDBAS for DELL_SMBIOS_SMM, if DELL_SMBIOS_WMI is enabled,
      DELL_SMBIOS becomes dependent on ACPI_WMI. Update the depends lines to
      prevent a configuration where DELL_SMBIOS=y and either backend
      dependency =m. Update the comment accordingly.
      
      Cc: Mario Limonciello <mario.limonciello@dell.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      75073a64
  4. 14 3月, 2018 6 次提交
  5. 13 3月, 2018 5 次提交
  6. 12 3月, 2018 1 次提交
  7. 11 3月, 2018 3 次提交
    • G
      dmaengine: mv_xor_v2: Fix clock resource by adding a register clock · 3cd2c313
      Gregory CLEMENT 提交于
      On the CP110 components which are present on the Armada 7K/8K SoC we need
      to explicitly enable the clock for the registers. However it is not
      needed for the AP8xx component, that's why this clock is optional.
      
      With this patch both clock have now a name, but in order to be backward
      compatible, the name of the first clock is not used. It allows to still
      use this clock with a device tree using the old binding.
      Signed-off-by: NGregory CLEMENT <gregory.clement@bootlin.com>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NVinod Koul <vinod.koul@intel.com>
      3cd2c313
    • F
      irqchip/irq-imx-gpcv2: Remove unused function · 61b8b228
      Fabio Estevam 提交于
      imx_gpcv2_get_wakeup_source() is not used anywhere, so remove it.
      
      This fixes the following sparse warning:
      
      drivers/irqchip/irq-imx-gpcv2.c:34:5: warning: symbol 'imx_gpcv2_get_wakeup_source' was not declared. Should it be static?
      
      Fixes: e324c4dc ("irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources")
      Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      61b8b228
    • A
      irqchip/gic-v3-its: Ensure nr_ites >= nr_lpis · 4f2c7583
      Ard Biesheuvel 提交于
      When struct its_device instances are created, the nr_ites member
      will be set to a power of 2 that equals or exceeds the requested
      number of MSIs passed to the msi_prepare() callback. At the same
      time, the LPI map is allocated to be some multiple of 32 in size,
      where the allocated size may be less than the requested size
      depending on whether a contiguous range of sufficient size is
      available in the global LPI bitmap.
      
      This may result in the situation where the nr_ites < nr_lpis, and
      since nr_ites is what we program into the hardware when we map the
      device, the additional LPIs will be non-functional.
      
      For bog standard hardware, this does not really matter. However,
      in cases where ITS device IDs are shared between different PCIe
      devices, we may end up allocating these additional LPIs without
      taking into account that they don't actually work.
      
      So let's make nr_ites at least 32. This ensures that all allocated
      LPIs are 'live', and that its_alloc_device_irq() will fail when
      attempts are made to allocate MSIs beyond what was allocated in
      the first place.
      Signed-off-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
      [maz: updated comment]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      4f2c7583
  8. 10 3月, 2018 9 次提交
    • L
      RDMA/mlx5: Fix integer overflow while resizing CQ · 28e9091e
      Leon Romanovsky 提交于
      The user can provide very large cqe_size which will cause to integer
      overflow as it can be seen in the following UBSAN warning:
      
      =======================================================================
      UBSAN: Undefined behaviour in drivers/infiniband/hw/mlx5/cq.c:1192:53
      signed integer overflow:
      64870 * 65536 cannot be represented in type 'int'
      CPU: 0 PID: 267 Comm: syzkaller605279 Not tainted 4.15.0+ #90 Hardware
      name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
      rel-1.7.5-0-ge51488c-20140602_164612-nilsson.home.kraxel.org 04/01/2014
      Call Trace:
       dump_stack+0xde/0x164
       ? dma_virt_map_sg+0x22c/0x22c
       ubsan_epilogue+0xe/0x81
       handle_overflow+0x1f3/0x251
       ? __ubsan_handle_negate_overflow+0x19b/0x19b
       ? lock_acquire+0x440/0x440
       mlx5_ib_resize_cq+0x17e7/0x1e40
       ? cyc2ns_read_end+0x10/0x10
       ? native_read_msr_safe+0x6c/0x9b
       ? cyc2ns_read_end+0x10/0x10
       ? mlx5_ib_modify_cq+0x220/0x220
       ? sched_clock_cpu+0x18/0x200
       ? lookup_get_idr_uobject+0x200/0x200
       ? rdma_lookup_get_uobject+0x145/0x2f0
       ib_uverbs_resize_cq+0x207/0x3e0
       ? ib_uverbs_ex_create_cq+0x250/0x250
       ib_uverbs_write+0x7f9/0xef0
       ? cyc2ns_read_end+0x10/0x10
       ? print_irqtrace_events+0x280/0x280
       ? ib_uverbs_ex_create_cq+0x250/0x250
       ? uverbs_devnode+0x110/0x110
       ? sched_clock_cpu+0x18/0x200
       ? do_raw_spin_trylock+0x100/0x100
       ? __lru_cache_add+0x16e/0x290
       __vfs_write+0x10d/0x700
       ? uverbs_devnode+0x110/0x110
       ? kernel_read+0x170/0x170
       ? sched_clock_cpu+0x18/0x200
       ? security_file_permission+0x93/0x260
       vfs_write+0x1b0/0x550
       SyS_write+0xc7/0x1a0
       ? SyS_read+0x1a0/0x1a0
       ? trace_hardirqs_on_thunk+0x1a/0x1c
       entry_SYSCALL_64_fastpath+0x1e/0x8b
      RIP: 0033:0x433549
      RSP: 002b:00007ffe63bd1ea8 EFLAGS: 00000217
      =======================================================================
      
      Cc: syzkaller <syzkaller@googlegroups.com>
      Cc: <stable@vger.kernel.org> # 3.13
      Fixes: bde51583 ("IB/mlx5: Add support for resize CQ")
      Reported-by: NNoa Osherovich <noaos@mellanox.com>
      Reviewed-by: NYishai Hadas <yishaih@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      28e9091e
    • D
      Revert "RDMA/mlx5: Fix integer overflow while resizing CQ" · 212a0cbc
      Doug Ledford 提交于
      The original commit of this patch has a munged log message that is
      missing several of the tags the original author intended to be on the
      patch.  This was due to patchworks misinterpreting a cut-n-paste
      separator line as an end of message line and munging the mbox that was
      used to import the patch:
      
      https://patchwork.kernel.org/patch/10264089/
      
      The original patch will be reapplied with a fixed commit message so the
      proper tags are applied.
      
      This reverts commit aa0de36a.
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      212a0cbc
    • H
      usb: typec: tcpm: fusb302: Do not log an error on -EPROBE_DEFER · 7832f6d1
      Hans de Goede 提交于
      Do not log an error if tcpm_register_port() fails with -EPROBE_DEFER.
      
      Fixes: cf140a35 ("typec: fusb302: Use dev_err during probe")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7832f6d1
    • F
      USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM · d6c931ea
      Fredrik Noring 提交于
      Scatter-gather needs to be disabled when using dma_declare_coherent_memory
      and HCD_LOCAL_MEM. Andrea Righi made the equivalent fix for EHCI drivers
      in commit 4307a28e "USB: EHCI: fix NULL pointer dererence in HCDs
      that use HCD_LOCAL_MEM".
      
      The following NULL pointer WARN_ON_ONCE triggered with OHCI drivers:
      
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 49 at drivers/usb/core/hcd.c:1379 hcd_alloc_coherent+0x4c/0xc8
      Modules linked in:
      CPU: 0 PID: 49 Comm: usb-storage Not tainted 4.15.0+ #1014
      Stack : 00000000 00000000 805a78d2 0000003a 81f5c2cc 8053d367 804d77fc 00000031
              805a3a08 00000563 81ee9400 805a0000 00000000 10058c00 81f61b10 805c0000
              00000000 00000000 805a0000 00d9038e 00000004 803ee818 00000006 312e3420
              805c0000 00000000 00000073 81f61958 00000000 00000000 802eb380 804fd538
              00000009 00000563 81ee9400 805a0000 00000002 80056148 00000000 805a0000
              ...
      Call Trace:
      [<578af360>] show_stack+0x74/0x104
      [<2f3702c6>] __warn+0x118/0x120
      [<ae93fc9e>] warn_slowpath_null+0x44/0x58
      [<a891a517>] hcd_alloc_coherent+0x4c/0xc8
      [<3578fa36>] usb_hcd_map_urb_for_dma+0x4d8/0x534
      [<110bc94c>] usb_hcd_submit_urb+0x82c/0x834
      [<02eb5baf>] usb_sg_wait+0x14c/0x1a0
      [<ccd09e85>] usb_stor_bulk_transfer_sglist.part.1+0xac/0x124
      [<87a5c34c>] usb_stor_bulk_srb+0x40/0x60
      [<ff1792ac>] usb_stor_Bulk_transport+0x160/0x37c
      [<b9e2709c>] usb_stor_invoke_transport+0x3c/0x500
      [<004754f4>] usb_stor_control_thread+0x258/0x28c
      [<22edf42e>] kthread+0x134/0x13c
      [<a419ffd0>] ret_from_kernel_thread+0x14/0x1c
      ---[ end trace bcdb825805eefdcc ]---
      Signed-off-by: NFredrik Noring <noring@nocrew.org>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d6c931ea
    • C
      usbip: vudc: fix null pointer dereference on udc->lock · df3334c2
      Colin Ian King 提交于
      Currently the driver attempts to spin lock on udc->lock before a NULL
      pointer check is performed on udc, hence there is a potential null
      pointer dereference on udc->lock.  Fix this by moving the null check
      on udc before the lock occurs.
      
      Fixes: ea6873a4 ("usbip: vudc: Add SysFS infrastructure for VUDC")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NShuah Khan <shuahkh@osg.samsung.com>
      Reviewed-by: NKrzysztof Opasiak <k.opasiak@samsung.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      df3334c2
    • D
      platform/x86: dell-smbios: Resolve dependency error on DCDBAS · 32d7b19b
      Darren Hart (VMware) 提交于
      When the DELL_SMBIOS_SMM backend is enabled, the DELL_SMBIOS symbol
      depends on DELL_DCDBAS, and we must avoid the situation where
      DELL_SMBIOS=y and DCDBAS=m.
      
      Adding the conditional dependency to DELL_SMBIOS such as:
      
      depends !DELL_SMBIOS_SMM || (DCDBAS || DCDBAS=n)
      
      results in the Kconfig tooling complaining about a circular dependency,
      although it appears to work in practice.
      
      Avoid the errors by simplifying the dependency and forcing DELL_SMBIOS
      to be <= DCDBAS if DCDBAS is enabled (thanks to Greg KH for the
      suggestion).
      
      Cc: Mario.Limonciello@dell.com
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      32d7b19b
    • D
      platform/x86: Allow for SMBIOS backend defaults · 329d58b8
      Darren Hart (VMware) 提交于
      Avoid accidental configurations by setting default y for DELL_SMBIOS
      backends. Avoid this impacting the default build size, by making them
      dependent on DELL_SMBIOS, so they only appear when DELL_SMBIOS is
      manually selected, or by DELL_LAPTOP or DELL_WMI.
      
      While DELL_SMBIOS does have a prompt, it does not have any dependencies.
      Keeping DELL_SMBIOS visible, despite being "select"ed by DELL_LAPTOP and
      DELL_WMI, is a deliberate choice to provide context for the WMI and SMM
      backends, which would otherwise appear to float without context within
      the menu.
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      329d58b8
    • M
      platform/x86: dell-smbios: Link all dell-smbios-* modules together · 25d47027
      Mario Limonciello 提交于
      Some race conditions were raised due to dell-smbios and its backends
      not being ready by the time that a consumer would call one of the
      exported methods.
      
      To avoid this problem, guarantee that all initialization has been
      done by linking them all together and running init for them all.
      
      As part of this change the Kconfig needs to be adjusted so that
      CONFIG_DELL_SMBIOS_SMM and CONFIG_DELL_SMBIOS_WMI are boolean
      rather than modules.
      
      CONFIG_DELL_SMBIOS is a visually selectable option again and both
      CONFIG_DELL_SMBIOS_WMI and CONFIG_DELL_SMBIOS_SMM are optional.
      Signed-off-by: NMario Limonciello <mario.limonciello@dell.com>
      [dvhart: Update prompt and help text for DELL_SMBIOS_* backends]
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      25d47027
    • M
      platform/x86: dell-smbios: Rename dell-smbios source to dell-smbios-base · 94f77cb1
      Mario Limonciello 提交于
      This is being done to faciliate a later change to link all the dell-smbios
      drivers together.
      Signed-off-by: NMario Limonciello <mario.limonciello@dell.com>
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      94f77cb1