1. 24 Mar, 2019 2 commits
    • Linus Torvalds's avatar
      Merge tag 'auxdisplay-for-linus-v5.1-rc2' of git://github.com/ojeda/linux · e0046bb3
      Linus Torvalds authored
      Pull auxdisplay updates from Miguel Ojeda:
       "A few fixes and improvements for auxdisplay:
      
         - Series to fix a memory leak in hd44780 while introducing
           charlcd_free(). From Andy Shevchenko
      
         - Series to clean up the Kconfig menus and a couple of improvements
           for charlcd. From Mans Rullgard"
      
      * tag 'auxdisplay-for-linus-v5.1-rc2' of git://github.com/ojeda/linux:
        auxdisplay: charlcd: make backlight initial state configurable
        auxdisplay: charlcd: simplify init message display
        auxdisplay: deconfuse configuration
        auxdisplay: hd44780: Convert to use charlcd_free()
        auxdisplay: panel: Convert to use charlcd_free()
        auxdisplay: charlcd: Introduce charlcd_free() helper
        auxdisplay: charlcd: Move to_priv() to charlcd namespace
        auxdisplay: hd44780: Fix memory leak on ->remove()
      e0046bb3
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 1fa8109f
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Six fixes to four drivers and two core fixes.
      
        One core fix simply corrects a missed destroy_rcu_head() but the other
        is hopefully the end of an ongoing effort to make suspend/resume play
        nicely with scsi quiesce"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: ibmvscsi: Fix empty event pool access during host removal
        scsi: ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton
        scsi: hisi_sas: Add softreset in hisi_sas_I_T_nexus_reset()
        scsi: qla2xxx: Fix NULL pointer crash due to stale CPUID
        scsi: qla2xxx: Fix FC-AL connection target discovery
        scsi: core: Avoid that a kernel warning appears during system resume
        scsi: core: Also call destroy_rcu_head() for passthrough requests
        scsi: iscsi: flush running unbind operations when removing a session
      1fa8109f
  2. 23 Mar, 2019 3 commits
    • Linus Torvalds's avatar
      Merge tag 'io_uring-20190323' of git://git.kernel.dk/linux-block · 1bdd3dbf
      Linus Torvalds authored
      Pull io_uring fixes and improvements from Jens Axboe:
       "The first five in this series are heavily inspired by the work Al did
        on the aio side to fix the races there.
      
        The last two re-introduce a feature that was in io_uring before it got
        merged, but which I pulled since we didn't have a good way to have
        BVEC iters that already have a stable reference. These aren't
        necessarily related to block, it's just how io_uring pins fixed
        buffers"
      
      * tag 'io_uring-20190323' of git://git.kernel.dk/linux-block:
        block: add BIO_NO_PAGE_REF flag
        iov_iter: add ITER_BVEC_FLAG_NO_REF flag
        io_uring: mark me as the maintainer
        io_uring: retry bulk slab allocs as single allocs
        io_uring: fix poll races
        io_uring: fix fget/fput handling
        io_uring: add prepped flag
        io_uring: make io_read/write return an integer
        io_uring: use regular request ref counts
      1bdd3dbf
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190323' of git://git.kernel.dk/linux-block · 2335cbe6
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "A set of fixes/changes that should go into this series. This contains:
      
         - Kernel doc / comment updates (Bart, Shenghui)
      
         - Un-export of core-only used function (Bart)
      
         - Fix race on loop file access (Dongli)
      
         - pf/pcd queue cleanup fixes (me)
      
         - Use appropriate helper for RESTART bit set (Yufen)
      
         - Use named identifier for classic poll (Yufen)"
      
      * tag 'for-linus-20190323' of git://git.kernel.dk/linux-block:
        sbitmap: trivial - update comment for sbitmap_deferred_clear_bit
        blkcg: Fix kernel-doc warnings
        blk-iolatency: #include "blk.h"
        block: Unexport blk_mq_add_to_requeue_list()
        block: add BLK_MQ_POLL_CLASSIC for hybrid poll and return EINVAL for unexpected value
        blk-mq: remove unused 'nr_expired' from blk_mq_hw_ctx
        loop: access lo_backing_file only when the loop device is Lo_bound
        blk-mq: use blk_mq_sched_mark_restart_hctx to set RESTART
        paride/pcd: cleanup queues when detection fails
        paride/pf: cleanup queues when detection fails
      2335cbe6
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.1-rc2' of git://github.com/ceph/ceph-client · 9a1050ad
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A follow up for the new alloc_size logic and a blacklisting fix,
        marked for stable"
      
      * tag 'ceph-for-5.1-rc2' of git://github.com/ceph/ceph-client:
        rbd: drop wait_for_latest_osdmap()
        libceph: wait for latest osdmap in ceph_monc_blacklist_add()
        rbd: set io_min, io_opt and discard_granularity to alloc_size
      9a1050ad
  3. 22 Mar, 2019 18 commits
  4. 21 Mar, 2019 17 commits
    • Jérôme Glisse's avatar
      drm/nouveau/dmem: empty chunk do not have a buffer object associated with them. · 83857418
      Jérôme Glisse authored
      Empty chunk do not have a bo associated with them so no need to pin/unpin
      on suspend/resume.
      
      This fix suspend/resume on 5.1rc1 when NOUVEAU_SVM is enabled.
      Signed-off-by: default avatarJérôme Glisse <jglisse@redhat.com>
      Reviewed-by: default avatarTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
      Tested-by: default avatarTobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      83857418
    • YueHaibing's avatar
      drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure · 909e9c9c
      YueHaibing authored
      pm_runtime_get_sync returns negative on failure.
      
      Fixes: eaeb9010 ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      909e9c9c
    • Dan Carpenter's avatar
      drm/nouveau/dmem: Fix a NULL vs IS_ERR() check · 18ec3c12
      Dan Carpenter authored
      The hmm_devmem_add() function doesn't return NULL, it returns error
      pointers.
      
      Fixes: 5be73b69 ("drm/nouveau/dmem: device memory helpers for SVM")
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      18ec3c12
    • YueHaibing's avatar
      drm/nouveau/dmem: remove set but not used variable 'drm' · 2219c9ee
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      drivers/gpu/drm/nouveau/nouveau_dmem.c: In function 'nouveau_dmem_free':
      drivers/gpu/drm/nouveau/nouveau_dmem.c:103:22: warning:
       variable 'drm' set but not used [-Wunused-but-set-variable]
        struct nouveau_drm *drm;
                            ^
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      2219c9ee
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · d92da1fb
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "Mostly fixes apart from the kprobe blacklist checking which was
        deferred because of conflicting with a fix merged after I pinned the
        arm64 for-next/core branch (f2b3d856 "arm64: kprobe: Always
        blacklist the KVM world-switch code").
      
        Summary:
      
         - Update the kprobe blacklist checking for arm64. This was supposed
           to be queued during the merging window but, due to conflicts, it
           was deferred post -rc1
      
         - Extend the Fujitsu erratum 010001 workaround to A64FX v1r0
      
         - Whitelist HiSilicon Taishan v110 CPUs as not susceptible to
           Meltdown
      
         - Export save_stack_trace_regs()
      
         - Remove obsolete selection of MULTI_IRQ_HANDLER"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: remove obsolete selection of MULTI_IRQ_HANDLER
        arm64: kpti: Whitelist HiSilicon Taishan v110 CPUs
        arm64: Add MIDR encoding for HiSilicon Taishan CPUs
        arm64/stacktrace: Export save_stack_trace_regs()
        arm64: apply workaround on A64FX v1r0
        arm64: kprobes: Use arch_populate_kprobe_blacklist()
        arm64: kprobes: Move exception_text check in blacklist
        arm64: kprobes: Remove unneeded RODATA check
        arm64: kprobes: Move extable address check into arch_prepare_kprobe()
      d92da1fb
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20190321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · fb549c55
      Linus Torvalds authored
      Pull selinux fix from Paul Moore:
       "Another small SELinux fix for v5.1"
      
      * tag 'selinux-pr-20190321' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: fix NULL dereference in policydb_destroy()
      fb549c55
    • Linus Torvalds's avatar
      Merge tag 'fixes_for_v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 0939221e
      Linus Torvalds authored
      Pull udf fixes from Jan Kara:
       "Two udf error handling fixes"
      
      * tag 'fixes_for_v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        udf: Propagate errors from udf_truncate_extents()
        udf: Fix crash on IO error during truncate
      0939221e
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 7294fbd4
      Linus Torvalds authored
      Pull fsnotify fixes from Jan Kara:
       "One inotify and one fanotify fix"
      
      * tag 'fsnotify_for_v5.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fanotify: Allow copying of file handle to userspace
        inotify: Fix fsnotify_mark refcount leak in inotify_update_existing_watch()
      7294fbd4
    • Wolfram Sang's avatar
      mmc: renesas_sdhi: limit block count to 16 bit for old revisions · c9a9497c
      Wolfram Sang authored
      R-Car Gen2 has two different SDHI incarnations in the same chip. The
      older one does not support the recently introduced 32 bit register
      access to the block count register. Make sure we use this feature only
      after the first known version.
      
      Thanks to the Renesas Testing team for this bug report!
      
      Fixes: 5603731a ("mmc: tmio: fix access width of Block Count Register")
      Reported-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
      Reviewed-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      Tested-by: default avatarPhong Hoang <phong.hoang.wz@renesas.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      c9a9497c
    • Daniel Drake's avatar
      mmc: alcor: fix DMA reads · 5ea47691
      Daniel Drake authored
      Setting max_blk_count to 1 here was causing the mmc block layer
      to always use the MMC_READ_SINGLE_BLOCK command here, which the
      driver does not DMA-accelerate.
      
      Drop the max_blk_ settings here. The mmc host defaults suffice,
      along with the max_segs and max_seg_size settings, which I have
      now documented in more detail.
      
      Now each MMC command reads 4 512-byte blocks, using DMA instead of
      PIO. On my SD card, this increases read performance (measured with dd)
      from 167kb/sec to 4.6mb/sec.
      
      Link: http://lkml.kernel.org/r/CAD8Lp47L5T3jnAjBiPs1cQ+yFA3L6LJtgFvMETnBrY63-Zdi2g@mail.gmail.comSigned-off-by: default avatarDaniel Drake <drake@endlessm.com>
      Reviewed-by: default avatarOleksij Rempel <linux@rempel-privat.de>
      Fixes: c5413ad8 ("mmc: add new Alcor Micro Cardreader SD/MMC driver")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      5ea47691
    • Kishon Vijay Abraham I's avatar
      mmc: sdhci-omap: Set caps2 to indicate no physical write protect pin · 031d2ccc
      Kishon Vijay Abraham I authored
      After commit 6d5cd068 ("mmc: sdhci: use WP GPIO in
      sdhci_check_ro()") and commit 39ee32ce ("mmc: sdhci-omap: drop
      ->get_ro() implementation"), sdhci-omap relied on SDHCI_PRESENT_STATE
      to check if the card is read-only, if wp-gpios is not populated
      in device tree. However SDHCI_PRESENT_STATE in sdhci-omap does not have
      correct read-only state.
      
      sdhci-omap can be used by platforms with both micro SD slot and standard
      SD slot with physical write protect pin (using GPIO). Set caps2 to
      MMC_CAP2_NO_WRITE_PROTECT based on if wp-gpios property is populated or
      not.
      
      This fix is required since existing device-tree node doesn't have
      "disable-wp" property and to preserve old-dt compatibility.
      
      Fixes: 6d5cd068 ("mmc: sdhci: use WP GPIO in sdhci_check_ro()")
      Fixes: 39ee32ce ("mmc: sdhci-omap: drop ->get_ro() implementation")
      Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      031d2ccc
    • Michael Ellerman's avatar
      powerpc/security: Fix spectre_v2 reporting · 92edf8df
      Michael Ellerman authored
      When I updated the spectre_v2 reporting to handle software count cache
      flush I got the logic wrong when there's no software count cache
      enabled at all.
      
      The result is that on systems with the software count cache flush
      disabled we print:
      
        Mitigation: Indirect branch cache disabled, Software count cache flush
      
      Which correctly indicates that the count cache is disabled, but
      incorrectly says the software count cache flush is enabled.
      
      The root of the problem is that we are trying to handle all
      combinations of options. But we know now that we only expect to see
      the software count cache flush enabled if the other options are false.
      
      So split the two cases, which simplifies the logic and fixes the bug.
      We were also missing a space before "(hardware accelerated)".
      
      The result is we see one of:
      
        Mitigation: Indirect branch serialisation (kernel only)
        Mitigation: Indirect branch cache disabled
        Mitigation: Software count cache flush
        Mitigation: Software count cache flush (hardware accelerated)
      
      Fixes: ee13cb24 ("powerpc/64s: Add support for software count cache flush")
      Cc: stable@vger.kernel.org # v4.19+
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: default avatarMichael Neuling <mikey@neuling.org>
      Reviewed-by: default avatarDiana Craciun <diana.craciun@nxp.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      92edf8df
    • Alexander Shiyan's avatar
      mmc: mxcmmc: "Revert mmc: mxcmmc: handle highmem pages" · 2b77158f
      Alexander Shiyan authored
      This reverts commit b189e758.
      
      Unable to handle kernel paging request at virtual address c8358000
      pgd = efa405c3
      [c8358000] *pgd=00000000
      Internal error: Oops: 805 [#1] PREEMPT ARM
      CPU: 0 PID: 711 Comm: kworker/0:2 Not tainted 4.20.0+ #30
      Hardware name: Freescale i.MX27 (Device Tree Support)
      Workqueue: events mxcmci_datawork
      PC is at mxcmci_datawork+0xbc/0x2ac
      LR is at mxcmci_datawork+0xac/0x2ac
      pc : [<c04e33c8>]    lr : [<c04e33b8>]    psr: 60000013
      sp : c6c93f08  ip : 24004180  fp : 00000008
      r10: c8358000  r9 : c78b3e24  r8 : c6c92000
      r7 : 00000000  r6 : c7bb8680  r5 : c7bb86d4  r4 : c78b3de0
      r3 : 00002502  r2 : c090b2e0  r1 : 00000880  r0 : 00000000
      Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
      Control: 0005317f  Table: a68a8000  DAC: 00000055
      Process kworker/0:2 (pid: 711, stack limit = 0x389543bc)
      Stack: (0xc6c93f08 to 0xc6c94000)
      3f00:                   c7bb86d4 00000000 00000000 c6cbfde0 c7bb86d4 c7ee4200
      3f20: 00000000 c0907ea8 00000000 c7bb86d8 c0907ea8 c012077c c6cbfde0 c7bb86d4
      3f40: c6cbfde0 c6c92000 c6cbfdf4 c09280ba c0907ea8 c090b2e0 c0907ebc c0120c18
      3f60: c6cbfde0 00000000 00000000 c6cbb580 c7ba7c40 c7837edc c6cbb598 00000000
      3f80: c6cbfde0 c01208f8 00000000 c01254fc c7ba7c40 c0125400 00000000 00000000
      3fa0: 00000000 00000000 00000000 c01010d0 00000000 00000000 00000000 00000000
      3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
      [<c04e33c8>] (mxcmci_datawork) from [<c012077c>] (process_one_work+0x1f0/0x338)
      [<c012077c>] (process_one_work) from [<c0120c18>] (worker_thread+0x320/0x474)
      [<c0120c18>] (worker_thread) from [<c01254fc>] (kthread+0xfc/0x118)
      [<c01254fc>] (kthread) from [<c01010d0>] (ret_from_fork+0x14/0x24)
      Exception stack(0xc6c93fb0 to 0xc6c93ff8)
      3fa0:                                     00000000 00000000 00000000 00000000
      3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
      Code: e3500000 1a000059 e5153050 e5933038 (e48a3004)
      ---[ end trace 54ca629b75f0e737 ]---
      note: kworker/0:2[711] exited with preempt_count 1
      Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
      Fixes: b189e758 ("mmc: mxcmmc: handle highmem pages")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      2b77158f
    • Jian-Hong Pan's avatar
      ALSA: hda/realtek: Enable headset MIC of Acer AIO with ALC286 · 667a8f73
      Jian-Hong Pan authored
      Some Acer AIO desktops like Veriton Z6860G, Z4860G and Z4660G cannot
      record sound from headset MIC.  This patch adds the
      ALC286_FIXUP_ACER_AIO_HEADSET_MIC quirk to fix this issue.
      
      Fixes: 9f8aefed ("ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4660G")
      Fixes: b72f936f ("ALSA: hda/realtek: Fix mic issue on Acer AIO Veriton Z4860G/Z6860G")
      Signed-off-by: default avatarJian-Hong Pan <jian-hong@endlessm.com>
      Reviewed-by: default avatarKailang Yang <kailang@realtek.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      667a8f73
    • Andrzej Hajda's avatar
      drm/exynos/mixer: fix MIXER shadow registry synchronisation code · 6a3b45ad
      Andrzej Hajda authored
      MIXER on Exynos5 SoCs uses different synchronisation method than Exynos4
      to update internal state (shadow registers).
      Apparently the driver implements it incorrectly. The rule should be
      as follows:
      - do not request updating registers until previous request was finished,
        ie. MXR_CFG_LAYER_UPDATE_COUNT must be 0.
      - before setting registers synchronisation on VSYNC should be turned off,
        ie. MXR_STATUS_SYNC_ENABLE should be reset,
      - after finishing MXR_STATUS_SYNC_ENABLE should be set again.
      The patch hopefully implements it correctly.
      Below sample kernel log from page fault caused by the bug:
      
      [   25.670038] exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0x2247b800
      [   25.677888] ------------[ cut here ]------------
      [   25.682164] kernel BUG at ../drivers/iommu/exynos-iommu.c:450!
      [   25.687971] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
      [   25.693778] Modules linked in:
      [   25.696816] CPU: 5 PID: 1553 Comm: fb-release_test Not tainted 5.0.0-rc7-01157-g5f86b1566bdd #136
      [   25.705646] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
      [   25.711710] PC is at exynos_sysmmu_irq+0x1c0/0x264
      [   25.716470] LR is at lock_is_held_type+0x44/0x64
      
      v2: added missing MXR_CFG_LAYER_UPDATE bit setting in mixer_enable_sync
      Reported-by: default avatarMarian Mihailescu <mihailescu2m@gmail.com>
      Signed-off-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
      Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
      6a3b45ad
    • Tyrel Datwyler's avatar
      scsi: ibmvscsi: Fix empty event pool access during host removal · 7f5203c1
      Tyrel Datwyler authored
      The event pool used for queueing commands is destroyed fairly early in the
      ibmvscsi_remove() code path. Since, this happens prior to the call so
      scsi_remove_host() it is possible for further calls to queuecommand to be
      processed which manifest as a panic due to a NULL pointer dereference as
      seen here:
      
      PANIC: "Unable to handle kernel paging request for data at address
      0x00000000"
      
      Context process backtrace:
      
      DSISR: 0000000042000000 ????Syscall Result: 0000000000000000
      4 [c000000002cb3820] memcpy_power7 at c000000000064204
      [Link Register] [c000000002cb3820] ibmvscsi_send_srp_event at d000000003ed14a4
      5 [c000000002cb3920] ibmvscsi_send_srp_event at d000000003ed14a4 [ibmvscsi] ?(unreliable)
      6 [c000000002cb39c0] ibmvscsi_queuecommand at d000000003ed2388 [ibmvscsi]
      7 [c000000002cb3a70] scsi_dispatch_cmd at d00000000395c2d8 [scsi_mod]
      8 [c000000002cb3af0] scsi_request_fn at d00000000395ef88 [scsi_mod]
      9 [c000000002cb3be0] __blk_run_queue at c000000000429860
      10 [c000000002cb3c10] blk_delay_work at c00000000042a0ec
      11 [c000000002cb3c40] process_one_work at c0000000000dac30
      12 [c000000002cb3cd0] worker_thread at c0000000000db110
      13 [c000000002cb3d80] kthread at c0000000000e3378
      14 [c000000002cb3e30] ret_from_kernel_thread at c00000000000982c
      
      The kernel buffer log is overfilled with this log:
      
      [11261.952732] ibmvscsi: found no event struct in pool!
      
      This patch reorders the operations during host teardown. Start by calling
      the SRP transport and Scsi_Host remove functions to flush any outstanding
      work and set the host offline. LLDD teardown follows including destruction
      of the event pool, freeing the Command Response Queue (CRQ), and unmapping
      any persistent buffers. The event pool destruction is protected by the
      scsi_host lock, and the pool is purged prior of any requests for which we
      never received a response. Finally, move the removal of the scsi host from
      our global list to the end so that the host is easily locatable for
      debugging purposes during teardown.
      
      Cc: <stable@vger.kernel.org> # v2.6.12+
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      7f5203c1
    • Tyrel Datwyler's avatar
      scsi: ibmvscsi: Protect ibmvscsi_head from concurrent modificaiton · 7205981e
      Tyrel Datwyler authored
      For each ibmvscsi host created during a probe or destroyed during a remove
      we either add or remove that host to/from the global ibmvscsi_head
      list. This runs the risk of concurrent modification.
      
      This patch adds a simple spinlock around the list modification calls to
      prevent concurrent updates as is done similarly in the ibmvfc driver and
      ipr driver.
      
      Fixes: 32d6e4b6 ("scsi: ibmvscsi: add vscsi hosts to global list_head")
      Cc: <stable@vger.kernel.org> # v4.10+
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      7205981e