08 Mar, 2023

7 commits


27 Sep, 2022

1 commit

  • This is the 5.15.70 stable release

    * tag 'v5.15.70': (2444 commits)
    Linux 5.15.70
    ALSA: hda/sigmatel: Fix unused variable warning for beep power change
    cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx6ul.dtsi
    arch/arm/mm/mmu.c
    arch/arm64/boot/dts/freescale/imx8mp-evk.dts
    drivers/gpu/drm/imx/dcss/dcss-kms.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c
    drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.h
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/soc/fsl/Kconfig
    drivers/soc/imx/gpcv2.c
    drivers/usb/dwc3/host.c
    net/dsa/slave.c
    sound/soc/fsl/imx-card.c

    Jason Liu
     

22 Jul, 2022

2 commits

  • [ Upstream commit e0c2ce8217955537dd5434baeba061f209797119 ]

    Virtio devices might lose their state when the VMM is restarted
    after a suspend to disk (hibernation) cycle. This means that the
    guest page size register must be restored for the virtio_mmio legacy
    interface, since otherwise the virtio queues are not functional.

    This is particularly problematic for QEMU that currently still defaults
    to using the legacy interface for virtio_mmio. Write the guest page
    size register again in virtio_mmio_restore() to make legacy virtio_mmio
    devices work correctly after hibernation.

    Signed-off-by: Stephan Gerhold
    Message-Id:
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Sasha Levin

    Stephan Gerhold
     
  • [ Upstream commit ed7ac37fde33ccd84e4bd2b9363c191f925364c7 ]

    Most virtio drivers provide freeze/restore callbacks to finish up
    device usage before suspend and to reinitialize the virtio device after
    resume. However, these callbacks are currently only called when using
    virtio_pci. virtio_mmio does not have any PM ops defined.

    This causes problems for example after suspend to disk (hibernation),
    since the virtio devices might lose their state after the VMM is
    restarted. Calling virtio_device_freeze()/restore() ensures that
    the virtio devices are re-initialized correctly.

    Fix this by implementing the dev_pm_ops for virtio_mmio,
    similar to virtio_pci_common.

    Signed-off-by: Stephan Gerhold
    Message-Id:
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Sasha Levin

    Stephan Gerhold
     

30 Jun, 2022

1 commit

  • This is the 5.15.50 stable release

    * tag 'v5.15.50': (1395 commits)
    Linux 5.15.50
    arm64: mm: Don't invalidate FROM_DEVICE buffers at start of DMA transfer
    serial: core: Initialize rs485 RTS polarity already on probe
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/bus/fsl-mc/fsl-mc-bus.c
    drivers/crypto/caam/ctrl.c
    drivers/pci/controller/dwc/pci-imx6.c
    drivers/spi/spi-fsl-qspi.c
    drivers/tty/serial/fsl_lpuart.c
    include/uapi/linux/dma-buf.h

    Jason Liu
     

22 Jun, 2022

2 commits

  • commit 7e415282b41bf0d15c6e0fe268f822d9b083f2f7 upstream.

    GCC 12 enhanced -Waddress when comparing array address to null [0],
    which warns:

    drivers/virtio/virtio_pci_common.c: In function ‘vp_del_vqs’:
    drivers/virtio/virtio_pci_common.c:257:29: warning: the comparison will always evaluate as ‘true’ for the pointer operand in ‘vp_dev->msix_affinity_masks + (sizetype)((long unsigned int)i * 256)’ must not be NULL [-Waddress]
    257 | if (vp_dev->msix_affinity_masks[i])
    | ^~~~~~

    In fact, the verification is comparing the result of a pointer
    arithmetic, the address "msix_affinity_masks + i", which will always
    evaluate to true.

    Under the hood, free_cpumask_var() calls kfree(), which is safe to pass
    NULL, not requiring non-null verification. So remove the verification
    to make compiler happy (happy compiler, happy life).

    [0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102103

    Signed-off-by: Murilo Opsfelder Araujo
    Message-Id:
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Christophe de Dinechin
    Cc: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Murilo Opsfelder Araujo
     
  • [ Upstream commit a58a7f97ba11391d2d0d408e0b24f38d86ae748e ]

    The reference must be released when device_register(&vm_cmdline_parent)
    failed. Add the corresponding 'put_device()' in the error handling path.

    Signed-off-by: chengkaitao
    Message-Id:
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang
    Signed-off-by: Sasha Levin

    chengkaitao
     

15 Jun, 2022

1 commit

  • [ Upstream commit 7a836a2aba09479c8e71fa43249eecc4af945f61 ]

    If an error occurs after a successful pci_request_selected_regions() call,
    it should be undone by a corresponding pci_release_selected_regions() call,
    as already done in vp_modern_remove().

    Fixes: fd502729fbbf ("virtio-pci: introduce modern device module")
    Signed-off-by: Christophe JAILLET
    Message-Id:
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Sasha Levin

    Christophe JAILLET
     

22 Mar, 2022

1 commit


16 Mar, 2022

2 commits

  • commit 4fa59ede95195f267101a1b8916992cf3f245cdb upstream.

    The feature negotiation was designed in a way that
    makes it possible for devices to know which config
    fields will be accessed by drivers.

    This is broken since commit 404123c2db79 ("virtio: allow drivers to
    validate features") with fallout in at least block and net. We have a
    partial work-around in commit 2f9a174f918e ("virtio: write back
    F_VERSION_1 before validate") which at least lets devices find out which
    format should config space have, but this is a partial fix: guests
    should not access config space without acknowledging features since
    otherwise we'll never be able to change the config space format.

    To fix, split finalize_features from virtio_finalize_features and
    call finalize_features with all feature bits before validation,
    and then - if validation changed any bits - once again after.

    Since virtio_finalize_features no longer writes out features
    rename it to virtio_features_ok - since that is what it does:
    checks that features are ok with the device.

    As a side effect, this also reduces the amount of hypervisor accesses -
    we now only acknowledge features once unless we are clearing any
    features when validating (which is uncommon).

    IRC I think that this was more or less always the intent in the spec but
    unfortunately the way the spec is worded does not say this explicitly, I
    plan to address this at the spec level, too.

    Acked-by: Jason Wang
    Cc: stable@vger.kernel.org
    Fixes: 404123c2db79 ("virtio: allow drivers to validate features")
    Fixes: 2f9a174f918e ("virtio: write back F_VERSION_1 before validate")
    Cc: "Halil Pasic"
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Greg Kroah-Hartman

    Michael S. Tsirkin
     
  • commit 838d6d3461db0fdbf33fc5f8a69c27b50b4a46da upstream.

    virtio_finalize_features is only used internally within virtio.
    No reason to export it.

    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck
    Acked-by: Jason Wang
    Signed-off-by: Greg Kroah-Hartman

    Michael S. Tsirkin
     

11 Mar, 2022

1 commit

  • This is the 5.15.27 stable release

    * tag 'v5.15.27': (3069 commits)
    Linux 5.15.27
    hamradio: fix macro redefine warning
    KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    arch/arm/boot/dts/imx7ulp.dtsi
    arch/arm64/boot/dts/freescale/fsl-ls1028a-qds.dts
    arch/arm64/boot/dts/freescale/imx8mq.dtsi
    drivers/dma-buf/heaps/cma_heap.c
    drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
    drivers/gpu/drm/mxsfb/mxsfb_kms.c
    drivers/mmc/host/sdhci-esdhc-imx.c
    drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
    drivers/rpmsg/rpmsg_char.c
    drivers/soc/imx/gpcv2.c
    drivers/thermal/imx_thermal.c

    Jason Liu
     

27 Jan, 2022

2 commits

  • commit 1861ba626ae9b98136f3e504208cdef6b29cd3ec upstream.

    A recently added error path does not mark ring unused when exiting on
    OOM, which will lead to BUG on the next entry in debug builds.

    TODO: refactor code so we have START_USE and END_USE in the same function.

    Fixes: fc6d70f40b3d ("virtio_ring: check desc == NULL when using indirect with packed")
    Cc: "Xuan Zhuo"
    Cc: Jiasheng Jiang
    Reviewed-by: Xuan Zhuo
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Greg Kroah-Hartman

    Michael S. Tsirkin
     
  • commit cf4a4493ff70874f8af26d75d4346c591c298e89 upstream.

    There is a check for vm->sbm.sb_states before, and it should check
    it here as well.

    Signed-off-by: Peng Hao
    Link: https://lore.kernel.org/r/20211222011225.40573-1-flyingpeng@tencent.com
    Signed-off-by: Michael S. Tsirkin
    Fixes: 5f1f79bbc9e2 ("virtio-mem: Paravirtualized memory hotplug")
    Cc: stable@vger.kernel.org # v5.8+
    Signed-off-by: Greg Kroah-Hartman

    Peng Hao
     

22 Dec, 2021

1 commit

  • commit 817fc978b5a29b039db0418a91072b31c9aab152 upstream.

    virtio_max_dma_size() returns the maximum DMA mapping size of the virtio
    device by querying dma_max_mapping_size() for the device when the DMA
    API is in use for the vring. Unfortunately, the device passed is
    initialised by register_virtio_device() and does not inherit the DMA
    configuration from its parent, resulting in SWIOTLB errors when bouncing
    is enabled and the default 256K mapping limit (IO_TLB_SEGSIZE) is not
    respected:

    | virtio-pci 0000:00:01.0: swiotlb buffer is full (sz: 294912 bytes), total 1024 (slots), used 725 (slots)

    Follow the pattern used elsewhere in the virtio_ring code when calling
    into the DMA layer and pass the parent device to dma_max_mapping_size()
    instead.

    Cc: Marc Zyngier
    Cc: Quentin Perret
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Signed-off-by: Will Deacon
    Link: https://lore.kernel.org/r/20211201112018.25276-1-will@kernel.org
    Acked-by: Jason Wang
    Tested-by: Suzuki K Poulose
    Fixes: e6d6dd6c875e ("virtio: Introduce virtio_max_dma_size()")
    Cc: Joerg Roedel
    Cc: Konrad Rzeszutek Wilk
    Cc: Christoph Hellwig
    Cc: Robin Murphy
    Signed-off-by: Steven Price
    Signed-off-by: Suzuki K Poulose
    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Greg Kroah-Hartman

    Will Deacon
     

01 Dec, 2021

1 commit

  • This is the 5.15.5 stable release

    * tag 'v5.15.5': (1261 commits)
    Linux 5.15.5
    ALSA: hda: hdac_stream: fix potential locking issue in snd_hdac_stream_assign()
    ALSA: hda: hdac_ext_stream: fix potential locking issues
    ...

    Conflicts:
    arch/powerpc/platforms/85xx/Makefile
    drivers/crypto/caam/caampkc.c
    drivers/gpu/drm/bridge/nwl-dsi.c
    drivers/gpu/drm/imx/imx-drm-core.c
    drivers/remoteproc/imx_rproc.c
    drivers/soc/imx/gpcv2.c
    include/linux/rpmsg.h

    Jason Liu
     

19 Nov, 2021

1 commit

  • [ Upstream commit fc6d70f40b3d0b3219e2026d05be0409695f620d ]

    When using indirect with packed, we don't check for allocation failures.
    This patch checks that and fall back on direct.

    Fixes: 1ce9e6055fa0 ("virtio_ring: introduce packed ring support")
    Signed-off-by: Xuan Zhuo
    Link: https://lore.kernel.org/r/20211020112323.67466-3-xuanzhuo@linux.alibaba.com
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: Sasha Levin

    Xuan Zhuo
     

02 Nov, 2021

3 commits


28 Oct, 2021

1 commit

  • The flags are currently overwritten, leading to the wrong direction
    being passed to the DMA unmap functions.

    Fixes: 72b5e8958738aaa4 ("virtio-ring: store DMA metadata in desc_extra for split virtqueue")
    Signed-off-by: Vincent Whitchurch
    Link: https://lore.kernel.org/r/20211026133100.17541-1-vincent.whitchurch@axis.com
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Vincent Whitchurch
     

13 Oct, 2021

1 commit

  • The virtio specification virtio-v1.1-cs01 states: "Transitional devices
    MUST detect Legacy drivers by detecting that VIRTIO_F_VERSION_1 has not
    been acknowledged by the driver." This is exactly what QEMU as of 6.1
    has done relying solely on VIRTIO_F_VERSION_1 for detecting that.

    However, the specification also says: "... the driver MAY read (but MUST
    NOT write) the device-specific configuration fields to check that it can
    support the device ..." before setting FEATURES_OK.

    In that case, any transitional device relying solely on
    VIRTIO_F_VERSION_1 for detecting legacy drivers will return data in
    legacy format. In particular, this implies that it is in big endian
    format for big endian guests. This naturally confuses the driver which
    expects little endian in the modern mode.

    It is probably a good idea to amend the spec to clarify that
    VIRTIO_F_VERSION_1 can only be relied on after the feature negotiation
    is complete. Before validate callback existed, config space was only
    read after FEATURES_OK. However, we already have two regressions, so
    let's address this here as well.

    The regressions affect the VIRTIO_NET_F_MTU feature of virtio-net and
    the VIRTIO_BLK_F_BLK_SIZE feature of virtio-blk for BE guests when
    virtio 1.0 is used on both sides. The latter renders virtio-blk unusable
    with DASD backing, because things simply don't work with the default.
    See Fixes tags for relevant commits.

    For QEMU, we can work around the issue by writing out the feature bits
    with VIRTIO_F_VERSION_1 bit set. We (ab)use the finalize_features
    config op for this. This isn't enough to address all vhost devices since
    these do not get the features until FEATURES_OK, however it looks like
    the affected devices actually never handled the endianness for legacy
    mode correctly, so at least that's not a regression.

    No devices except virtio net and virtio blk seem to be affected.

    Long term the right thing to do is to fix the hypervisors.

    Cc: #v4.11
    Signed-off-by: Halil Pasic
    Fixes: 82e89ea077b9 ("virtio-blk: Add validation for block size in config space")
    Fixes: fe36cbe0671e ("virtio_net: clear MTU when out of range")
    Reported-by: markver@us.ibm.com
    Reviewed-by: Cornelia Huck
    Link: https://lore.kernel.org/r/20211011053921.1198936-1-pasic@linux.ibm.com
    Signed-off-by: Michael S. Tsirkin

    Halil Pasic
     

15 Sep, 2021

1 commit

  • A recent change checking of_device_is_compatible on probe broke some
    powerpc/pseries setups. Apparently there virtio devices do not have a
    "compatible" property - they are matched by PCI vendor/device ids.

    Let's just skip of_node setup but proceed with initialization like we
    did previously.

    Fixes: 694a1116b405 ("virtio: Bind virtio device to device-tree node")
    Reported-by: Alexey Kardashevskiy
    Cc: Arnd Bergmann
    Cc: Viresh Kumar
    Tested-by: Guenter Roeck
    Acked-by: Jason Wang
    Reviewed-by: Viresh Kumar
    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

12 Sep, 2021

1 commit

  • Pull virtio updates from Michael Tsirkin:

    - vduse driver ("vDPA Device in Userspace") supporting emulated virtio
    block devices

    - virtio-vsock support for end of record with SEQPACKET

    - vdpa: mac and mq support for ifcvf and mlx5

    - vdpa: management netlink for ifcvf

    - virtio-i2c, gpio dt bindings

    - misc fixes and cleanups

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (39 commits)
    Documentation: Add documentation for VDUSE
    vduse: Introduce VDUSE - vDPA Device in Userspace
    vduse: Implement an MMU-based software IOTLB
    vdpa: Support transferring virtual addressing during DMA mapping
    vdpa: factor out vhost_vdpa_pa_map() and vhost_vdpa_pa_unmap()
    vdpa: Add an opaque pointer for vdpa_config_ops.dma_map()
    vhost-iotlb: Add an opaque pointer for vhost IOTLB
    vhost-vdpa: Handle the failure of vdpa_reset()
    vdpa: Add reset callback in vdpa_config_ops
    vdpa: Fix some coding style issues
    file: Export receive_fd() to modules
    eventfd: Export eventfd_wake_count to modules
    iova: Export alloc_iova_fast() and free_iova_fast()
    virtio-blk: remove unneeded "likely" statements
    virtio-balloon: Use virtio_find_vqs() helper
    vdpa: Make use of PFN_PHYS/PFN_UP/PFN_DOWN helper macro
    vsock_test: update message bounds test for MSG_EOR
    af_vsock: rename variables in receive loop
    virtio/vsock: support MSG_EOR bit processing
    vhost/vsock: support MSG_EOR bit processing
    ...

    Linus Torvalds
     

09 Sep, 2021

3 commits

  • Merge more updates from Andrew Morton:
    "147 patches, based on 7d2a07b769330c34b4deabeed939325c77a7ec2f.

    Subsystems affected by this patch series: mm (memory-hotplug, rmap,
    ioremap, highmem, cleanups, secretmem, kfence, damon, and vmscan),
    alpha, percpu, procfs, misc, core-kernel, MAINTAINERS, lib,
    checkpatch, epoll, init, nilfs2, coredump, fork, pids, criu, kconfig,
    selftests, ipc, and scripts"

    * emailed patches from Andrew Morton : (94 commits)
    scripts: check_extable: fix typo in user error message
    mm/workingset: correct kernel-doc notations
    ipc: replace costly bailout check in sysvipc_find_ipc()
    selftests/memfd: remove unused variable
    Kconfig.debug: drop selecting non-existing HARDLOCKUP_DETECTOR_ARCH
    configs: remove the obsolete CONFIG_INPUT_POLLDEV
    prctl: allow to setup brk for et_dyn executables
    pid: cleanup the stale comment mentioning pidmap_init().
    kernel/fork.c: unexport get_{mm,task}_exe_file
    coredump: fix memleak in dump_vma_snapshot()
    fs/coredump.c: log if a core dump is aborted due to changed file permissions
    nilfs2: use refcount_dec_and_lock() to fix potential UAF
    nilfs2: fix memory leak in nilfs_sysfs_delete_snapshot_group
    nilfs2: fix memory leak in nilfs_sysfs_create_snapshot_group
    nilfs2: fix memory leak in nilfs_sysfs_delete_##name##_group
    nilfs2: fix memory leak in nilfs_sysfs_create_##name##_group
    nilfs2: fix NULL pointer in nilfs_##name##_attr_release
    nilfs2: fix memory leak in nilfs_sysfs_create_device_group
    trap: cleanup trap_init()
    init: move usermodehelper_enable() to populate_rootfs()
    ...

    Linus Torvalds
     
  • Let's use a single dynamic memory group.

    Link: https://lkml.kernel.org/r/20210806124715.17090-8-david@redhat.com
    Signed-off-by: David Hildenbrand
    Cc: Anshuman Khandual
    Cc: Dan Williams
    Cc: Dave Hansen
    Cc: Greg Kroah-Hartman
    Cc: Hui Zhu
    Cc: Jason Wang
    Cc: Len Brown
    Cc: Marek Kedzierski
    Cc: "Michael S. Tsirkin"
    Cc: Michal Hocko
    Cc: Mike Rapoport
    Cc: Oscar Salvador
    Cc: Pankaj Gupta
    Cc: Pavel Tatashin
    Cc: Rafael J. Wysocki
    Cc: "Rafael J. Wysocki"
    Cc: Vitaly Kuznetsov
    Cc: Vlastimil Babka
    Cc: Wei Yang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Hildenbrand
     
  • There is only a single user remaining. We can simply lookup the nid only
    used for node offlining purposes when walking our memory blocks. We don't
    expect to remove multi-nid ranges; and if we'd ever do, we most probably
    don't care about removing multi-nid ranges that actually result in empty
    nodes.

    If ever required, we can detect the "multi-nid" scenario and simply try
    offlining all online nodes.

    Link: https://lkml.kernel.org/r/20210712124052.26491-4-david@redhat.com
    Signed-off-by: David Hildenbrand
    Acked-by: Michael Ellerman (powerpc)
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Rafael J. Wysocki"
    Cc: Len Brown
    Cc: Dan Williams
    Cc: Vishal Verma
    Cc: Dave Jiang
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Cc: Nathan Lynch
    Cc: Laurent Dufour
    Cc: "Aneesh Kumar K.V"
    Cc: Scott Cheloha
    Cc: Anton Blanchard
    Cc: Andy Lutomirski
    Cc: Anshuman Khandual
    Cc: Ard Biesheuvel
    Cc: Baoquan He
    Cc: Borislav Petkov
    Cc: Catalin Marinas
    Cc: Christian Borntraeger
    Cc: Christophe Leroy
    Cc: Dave Hansen
    Cc: Heiko Carstens
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Jia He
    Cc: Joe Perches
    Cc: Kefeng Wang
    Cc: Michal Hocko
    Cc: Michel Lespinasse
    Cc: Mike Rapoport
    Cc: Nicholas Piggin
    Cc: Oscar Salvador
    Cc: Pankaj Gupta
    Cc: Pankaj Gupta
    Cc: Pavel Tatashin
    Cc: Peter Zijlstra
    Cc: Pierre Morel
    Cc: "Rafael J. Wysocki"
    Cc: Rich Felker
    Cc: Sergei Trofimovich
    Cc: Thiago Jung Bauermann
    Cc: Thomas Gleixner
    Cc: Vasily Gorbik
    Cc: Vitaly Kuznetsov
    Cc: Vlastimil Babka
    Cc: Wei Yang
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Hildenbrand
     

06 Sep, 2021

2 commits

  • Use the helper virtio_find_vqs().

    Signed-off-by: Xianting Tian
    Reviewed-by: David Hildenbrand
    Acked-by: Jason Wang
    Link: https://lore.kernel.org/r/20210723054259.2779-1-xianting.tian@linux.alibaba.com
    Signed-off-by: Michael S. Tsirkin

    Xianting Tian
     
  • Bind the virtio devices with their of_node. This will help users of the
    virtio devices to mention their dependencies on the device in the DT
    itself. Like GPIO pin users can use the phandle of the device node, or
    the node may contain more subnodes to add i2c or spi eeproms and other
    users.

    Reviewed-by: Arnd Bergmann
    Signed-off-by: Viresh Kumar
    Link: https://lore.kernel.org/r/94c12705602929968477aaf27e02439eb7a7f253.1627362340.git.viresh.kumar@linaro.org
    Signed-off-by: Michael S. Tsirkin

    Viresh Kumar
     

01 Sep, 2021

1 commit

  • Pull driver core updates from Greg KH:
    "Here is the big set of driver core patches for 5.15-rc1.

    These do change a number of different things across different
    subsystems, and because of that, there were 2 stable tags created that
    might have already come into your tree from different pulls that did
    the following

    - changed the bus remove callback to return void

    - sysfs iomem_get_mapping rework

    Other than those two things, there's only a few small things in here:

    - kernfs performance improvements for huge numbers of sysfs users at
    once

    - tiny api cleanups

    - other minor changes

    All of these have been in linux-next for a while with no reported
    problems, other than the before-mentioned merge issue"

    * tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (33 commits)
    MAINTAINERS: Add dri-devel for component.[hc]
    driver core: platform: Remove platform_device_add_properties()
    ARM: tegra: paz00: Handle device properties with software node API
    bitmap: extend comment to bitmap_print_bitmask/list_to_buf
    drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI
    topology: use bin_attribute to break the size limitation of cpumap ABI
    lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases
    cpumask: introduce cpumap_print_list/bitmask_to_buf to support large bitmask and list
    sysfs: Rename struct bin_attribute member to f_mapping
    sysfs: Invoke iomem_get_mapping() from the sysfs open callback
    debugfs: Return error during {full/open}_proxy_open() on rmmod
    zorro: Drop useless (and hardly used) .driver member in struct zorro_dev
    zorro: Simplify remove callback
    sh: superhyway: Simplify check in remove callback
    nubus: Simplify check in remove callback
    nubus: Make struct nubus_driver::remove return void
    kernfs: dont call d_splice_alias() under kernfs node lock
    kernfs: use i_lock to protect concurrent inode updates
    kernfs: switch kernfs to use an rwsem
    kernfs: use VFS negative dentry caching
    ...

    Linus Torvalds
     

28 Aug, 2021

1 commit

  • virtio_mem_set_fake_offline() might sleep now, and we call it under
    rcu_read_lock(). To fix it, simply move the rcu_read_unlock() further
    up, as we're done with the device.

    Reported-by: Dan Carpenter
    Fixes: 6cc26d77613a: "virtio-mem: use page_offline_(start|end) when setting PageOffline()
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Cc: Andrew Morton
    Cc: virtualization@lists.linux-foundation.org
    Signed-off-by: David Hildenbrand
    Signed-off-by: Linus Torvalds

    David Hildenbrand
     

11 Aug, 2021

2 commits


10 Aug, 2021

1 commit

  • When a virtio pci device undergo surprise removal (aka async removal in
    PCIe spec), mark the device as broken so that any upper layer drivers can
    abort any outstanding operation.

    When a virtio net pci device undergo surprise removal which is used by a
    NetworkManager, a below call trace was observed.

    kernel:watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [kworker/1:1:27059]
    watchdog: BUG: soft lockup - CPU#1 stuck for 52s! [kworker/1:1:27059]
    CPU: 1 PID: 27059 Comm: kworker/1:1 Tainted: G S W I L 5.13.0-hotplug+ #8
    Hardware name: Dell Inc. PowerEdge R640/0H28RR, BIOS 2.9.4 11/06/2020
    Workqueue: events linkwatch_event
    RIP: 0010:virtnet_send_command+0xfc/0x150 [virtio_net]
    Call Trace:
    virtnet_set_rx_mode+0xcf/0x2a7 [virtio_net]
    ? __hw_addr_create_ex+0x85/0xc0
    __dev_mc_add+0x72/0x80
    igmp6_group_added+0xa7/0xd0
    ipv6_mc_up+0x3c/0x60
    ipv6_find_idev+0x36/0x80
    addrconf_add_dev+0x1e/0xa0
    addrconf_dev_config+0x71/0x130
    addrconf_notify+0x1f5/0xb40
    ? rtnl_is_locked+0x11/0x20
    ? __switch_to_asm+0x42/0x70
    ? finish_task_switch+0xaf/0x2c0
    ? raw_notifier_call_chain+0x3e/0x50
    raw_notifier_call_chain+0x3e/0x50
    netdev_state_change+0x67/0x90
    linkwatch_do_dev+0x3c/0x50
    __linkwatch_run_queue+0xd2/0x220
    linkwatch_event+0x21/0x30
    process_one_work+0x1c8/0x370
    worker_thread+0x30/0x380
    ? process_one_work+0x370/0x370
    kthread+0x118/0x140
    ? set_kthread_struct+0x40/0x40
    ret_from_fork+0x1f/0x30

    Hence, add the ability to abort the command on surprise removal
    which prevents infinite loop and system lockup.

    Signed-off-by: Parav Pandit
    Link: https://lore.kernel.org/r/20210721142648.1525924-5-parav@nvidia.com
    Signed-off-by: Michael S. Tsirkin

    Parav Pandit