1. 04 Apr, 2023 5 commits
    • Ross Zwisler's avatar
      tools/virtio: fix typo in README instructions · 9513c55c
      Ross Zwisler authored
      We need to have a unique chardev for each data path, else the chardevs
      will collide and qemu will die with this message:
      
        qemu-system-x86_64: -device
        virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel0,
        id=channel1,name=trace-path-cpu0:
        Property 'virtserialport.chardev' can't take value 'charchannel0':
        Device 'charchannel0' is in use
      Signed-off-by: default avatarRoss Zwisler <zwisler@google.com>
      Message-Id: <20230215223350.2658616-7-zwisler@google.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      9513c55c
    • Mike Christie's avatar
      vhost-scsi: Fix crash during LUN unmapping · 4c363c81
      Mike Christie authored
      We normally clear the endpoint then unmap LUNs so the devices are fully
      shutdown when the LUN is unmapped, but it's legal to unmap before
      clearing. If the user does that while TMFs are running then we can end
      up crashing.
      
      vhost_scsi_port_unlink assumes that the LUN's tmf struct will always be on
      the tmf_queue list. However, if a TMF is running then it will have been
      removed while it's executing. If we do a LUN unmap at this time, then
      we assume the entry is on the list and just start accessing it and free
      it.
      
      This fixes the bug by just allocating the vhost_scsi_tmf struct when it's
      needed like is done with the se_tmr struct that's needed when we submit
      the TMF. In this path perf is not an issue and we can use GFP_KERNEL
      since it won't swing directly back on us, so we don't need to preallocate
      the struct.
      Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
      Message-Id: <20230321020624.13323-3-michael.christie@oracle.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      4c363c81
    • Mike Christie's avatar
      vhost-scsi: Fix vhost_scsi struct use after free · e508efc3
      Mike Christie authored
      If vhost_scsi_setup_vq_cmds fails we leave the tpg->vhost_scsi pointer
      set. If the device is freed and then the user unmaps the LUN, the call to
      vhost_scsi_port_unlink -> vhost_scsi_hotunplug will see the that
      tpg->vhost_scsi is still set and try to use it.
      
      This has us clear the vhost_scsi pointer in the failure path. It also
      has us take tv_tpg_mutex in this failure path, because tv_tpg_vhost_count
      is accessed under this mutex in vhost_scsi_drop_nexus and in the future
      we will want to serialize access to tpg->vhost_scsi with that mutex
      instead of the vhost_scsi_mutex.
      Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
      Message-Id: <20230321020624.13323-2-michael.christie@oracle.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      e508efc3
    • Dmitry Fomichev's avatar
      virtio-blk: fix ZBD probe in kernels without ZBD support · 10805eb5
      Dmitry Fomichev authored
      When the kernel is built without support for zoned block devices,
      virtio-blk probe needs to error out any host-managed device scans
      to prevent such devices from appearing in the system as non-zoned.
      The current virtio-blk code simply bypasses all ZBD checks if
      CONFIG_BLK_DEV_ZONED is not defined and this leads to host-managed
      block devices being presented as non-zoned in the OS. This is one of
      the main problems this patch series is aimed to fix.
      
      In this patch, make VIRTIO_BLK_F_ZONED feature defined even when
      CONFIG_BLK_DEV_ZONED is not. This change makes the code compliant with
      the voted revision of virtio-blk ZBD spec. Modify the probe code to
      look at the situation when VIRTIO_BLK_F_ZONED is negotiated in a kernel
      that is built without ZBD support. In this case, the code checks
      the zoned model of the device and fails the probe is the device
      is host-managed.
      
      The patch also adds the comment to clarify that the call to perform
      the zoned device probe is correctly placed after virtio_device ready().
      
      Fixes: 95bfec41 ("virtio-blk: add support for zoned block devices")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDmitry Fomichev <dmitry.fomichev@wdc.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Message-Id: <20230330214953.1088216-3-dmitry.fomichev@wdc.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      10805eb5
    • Dmitry Fomichev's avatar
      virtio-blk: fix to match virtio spec · f1ba4e67
      Dmitry Fomichev authored
      The merged patch series to support zoned block devices in virtio-blk
      is not the most up to date version. The merged patch can be found at
      
      https://lore.kernel.org/linux-block/20221016034127.330942-3-dmitry.fomichev@wdc.com/
      
      but the latest and reviewed version is
      
      https://lore.kernel.org/linux-block/20221110053952.3378990-3-dmitry.fomichev@wdc.com/
      
      The reason is apparently that the correct mailing lists and
      maintainers were not copied.
      
      The differences between the two are mostly cleanups, but there is one
      change that is very important in terms of compatibility with the
      approved virtio-zbd specification.
      
      Before it was approved, the OASIS virtio spec had a change in
      VIRTIO_BLK_T_ZONE_APPEND request layout that is not reflected in the
      current virtio-blk driver code. In the running code, the status is
      the first byte of the in-header that is followed by some pad bytes
      and the u64 that carries the sector at which the data has been written
      to the zone back to the driver, aka the append sector.
      
      This layout turned out to be problematic for implementing in QEMU and
      the request status byte has been eventually made the last byte of the
      in-header. The current code doesn't expect that and this causes the
      append sector value always come as zero to the block layer. This needs
      to be fixed ASAP.
      
      Fixes: 95bfec41 ("virtio-blk: add support for zoned block devices")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarDmitry Fomichev <dmitry.fomichev@wdc.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      Message-Id: <20230330214953.1088216-2-dmitry.fomichev@wdc.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      f1ba4e67
  2. 02 Apr, 2023 5 commits
  3. 01 Apr, 2023 5 commits
    • Linus Torvalds's avatar
      Merge tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · f7772da6
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Four cifs/smb3 client (reconnect and DFS related) fixes, including two
        for stable:
      
         - DFS oops fix
      
         - DFS reconnect recursion fix
      
         - An SMB1 parallel reconnect fix
      
         - Trivial dead code removal in smb2_reconnect"
      
      * tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: get rid of dead check in smb2_reconnect()
        cifs: prevent infinite recursion in CIFSGetDFSRefer()
        cifs: avoid races in parallel reconnects in smb1
        cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
      f7772da6
    • Linus Torvalds's avatar
      Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 00c7b5f4
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of
         switching to -funsigned-char
      
       - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices
      
       - a quirk to Goodix touchscreen driver to handle Yoga Book X90F
      
       - a fix for incorrectly merged patch to xpad game controller driver
      
      * tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix
        Input: alps - fix compatibility with -funsigned-char
        Input: focaltech - use explicitly signed char type
        Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
        Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
        Input: i8042 - add quirk for Fujitsu Lifebook A574/H
      00c7b5f4
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 93e2b017
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Some pin control fixes for the v6.3 series.
      
        The most notable and urgent one is probably the AMD fix which affects
        AMD laptops, found by the Chromium people.
      
        Summary:
      
         - Fix up the Kconfig options for MediaTek MT7981
      
         - Fix the irq domain name in the AT91-PIO4 driver
      
         - Fix some alternative muxing modes in the Ocelot driver
      
         - Allocate the GPIO numbers dynamically in the STM32 driver
      
         - Disable and mask interrupts on resume in the AMD driver
      
         - Fix a typo in the Qualcomm SM8550 pin control device tree bindings"
      
      * tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: allow input-enabled and bias-bus-hold
        pinctrl: amd: Disable and mask interrupts on resume
        pinctrl: stm32: use dynamic allocation of GPIO base
        pinctrl: ocelot: Fix alt mode for ocelot
        pinctrl: at91-pio4: fix domain name assignment
        pinctrl: mediatek: fix naming inconsistency
        pinctrl: mediatek: add missing options to PINCTRL_MT7981
      93e2b017
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v6.3-2' of... · ce0c2375
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Fix linux-headers debian package
      
       - Fix a merge_config.sh error due to a misspelled variable
      
       - Fix modversion for 32-bit build machines
      
      * tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        modpost: Fix processing of CRCs on 32-bit build machines
        scripts: merge_config: Fix typo in variable name.
        kbuild: deb-pkg: set version for linux-headers paths
      ce0c2375
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 92367fdf
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Maintainer update for S390 IOMMU driver
      
       - A fix for the set_platform_dma_ops() call-back in the Exynos
         IOMMU driver
      
       - Intel VT-d fixes from Lu Baolu:
          - Fix a lockdep splat
          - Fix a supplement of the specification
          - Fix a warning in perfmon code
      
      * tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug
        iommu/vt-d: Allow zero SAGAW if second-stage not supported
        iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc()
        iommu/exynos: Fix set_platform_dma_ops() callback
        MAINTAINERS: Update s390-iommu driver maintainer information
      92367fdf
  4. 31 Mar, 2023 19 commits
  5. 30 Mar, 2023 6 commits