Commit Graph

1107879 Commits

Author SHA1 Message Date
Greg Kroah-Hartman
c18e2df05b Revert "ANDROID: arch_topology: Export thermal pressure symbol"
This reverts commit d7db9dc74f.

This should no longer be needed to be exported.  If so, please submit
the needed driver upstream.

Bug: 175847109
Cc: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I21751d44a1c28b22eec53f5f6212b1934c84febb
2022-07-06 19:21:13 +02:00
Treehugger Robot
90b20e9248 Merge "Merge 6f9b5ed8ca ("Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline" into android-mainline 2022-07-02 13:14:55 +00:00
Treehugger Robot
6af59ed151 Merge "Merge 54c2cc7919 ("Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline" into android-mainline 2022-07-02 13:13:28 +00:00
Treehugger Robot
bcc702a63f Merge "Merge 932c2989b5 ("Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into android-mainline" into android-mainline 2022-07-02 13:11:42 +00:00
Treehugger Robot
229095a2b5 Merge "Merge 78c6499c92 ("Merge tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline" into android-mainline 2022-07-01 22:35:35 +00:00
Treehugger Robot
31414f8bd2 Merge "Merge 72fbbc3d0e ("Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline" into android-mainline 2022-07-01 22:32:15 +00:00
Treehugger Robot
d75fe523d0 Merge "Merge 4ad680f083 ("Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging") into android-mainline" into android-mainline 2022-07-01 22:29:23 +00:00
Greg Kroah-Hartman
3b6d09b4a7 Merge 6f9b5ed8ca ("Merge tag 'char-misc-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mainline
Steps on the way to 5.19-rc1

Resolves merge conflicts in:
	drivers/android/binder.c

Cc: Carlos Llamas <cmllamas@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifcc17a51f95579eb91e23a2c3940cecad5582f15
2022-07-01 22:46:48 +02:00
Greg Kroah-Hartman
2825770ce3 Merge 54c2cc7919 ("Merge tag 'usb-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I276fa015c31114e7fdd76ce8bec6e66c25b9fc0d
2022-07-01 22:46:00 +02:00
Greg Kroah-Hartman
2919b774ff Merge 78c6499c92 ("Merge tag 'for-5.19/drivers-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8ebc847ccfb6190c7bd1c03e712e5c042677c26d
2022-07-01 22:43:36 +02:00
Greg Kroah-Hartman
63bd557bb8 Merge 72fbbc3d0e ("Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I75d5d66bcaf65819af32dcece0085363e7d94174
2022-07-01 22:43:19 +02:00
Greg Kroah-Hartman
2031c74ede Merge 34845d92bc ("Merge tag 'for-5.19/block-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I809f84ca1baedbc84ae30f5c26a12dced1223216
2022-07-01 22:43:00 +02:00
Greg Kroah-Hartman
d1343179cf Merge 5ac8bdb9ad ("Merge tag 'io_uring-5.19-2022-06-02' of git://git.kernel.dk/linux-block") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ifb1cca96ab3d0a83719c780afb9f2d05dc9a95b4
2022-07-01 22:42:43 +02:00
Greg Kroah-Hartman
38c9e76513 Merge 932c2989b5 ("Merge tag 'tty-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into android-mainline
Steps on the way to 5.19-rc1

Resolves merge conflicts in:
	drivers/tty/hvc/hvc_dcc.c

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I11d3fa88102b8efda85d2c37fee3138b211e4afa
2022-07-01 22:38:32 +02:00
Greg Kroah-Hartman
2b869d8965 Merge 4ad680f083 ("Merge tag 'staging-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib8ea92592ccd22820e027da7ec71c650b73ba84f
2022-07-01 22:34:06 +02:00
Deming Wang
d712ca5a16 UPSTREAM: virtio_ring: make vring_create_virtqueue_split prettier
Add some spaces to vring_alloc_queue(make it look prettier).

Signed-off-by: Deming Wang <wangdeming@inspur.com>
Message-Id: <20220622192306.4371-1-wangdeming@inspur.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit c7cc29aaeb)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I13a21cf962980ae6cdb84f5564c43b2506448baf
2022-07-01 20:24:03 +00:00
Stefano Garzarella
e14dde1bce UPSTREAM: vhost-vdpa: call vhost_vdpa_cleanup during the release
Before commit 3d56987938 ("vhost-vdpa: introduce asid based IOTLB")
we call vhost_vdpa_iotlb_free() during the release to clean all regions
mapped in the iotlb.

That commit removed vhost_vdpa_iotlb_free() and added vhost_vdpa_cleanup()
to do some cleanup, including deleting all mappings, but we forgot to call
it in vhost_vdpa_release().

This causes that if an application does not remove all mappings explicitly
(or it crashes), the mappings remain in the iotlb and subsequent
applications may fail if they map the same addresses.

Calling vhost_vdpa_cleanup() also fixes a memory leak since we are not
freeing `v->vdev.vqs` during the release from the same commit.

Since vhost_vdpa_cleanup() calls vhost_dev_cleanup() we can remove its
call from vhost_vdpa_release().

Fixes: 3d56987938 ("vhost-vdpa: introduce asid based IOTLB")
Cc: gautam.dawar@xilinx.com
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20220622151407.51232-1-sgarzare@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 037d430556)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2101b1b45143c342bc85a379a8859474f7c5128
2022-07-01 20:24:03 +00:00
Stephan Gerhold
f9cd6692e7 UPSTREAM: virtio_mmio: Restore guest page size on resume
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 <stephan.gerhold@kernkonzept.com>
Message-Id: <20220621110621.3638025-3-stephan.gerhold@kernkonzept.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit e0c2ce8217)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dc514a699d9fbc4a209ef9523e3bc25dbe6a3d5
2022-07-01 20:24:03 +00:00
Stephan Gerhold
f94739ce6c UPSTREAM: virtio_mmio: Add missing PM calls to freeze/restore
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 <stephan.gerhold@kernkonzept.com>
Message-Id: <20220621110621.3638025-2-stephan.gerhold@kernkonzept.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit ed7ac37fde)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6be577fb90dd9c444b11676b0baf80d1c5c20de6
2022-07-01 20:24:03 +00:00
Jason Wang
b05f74c17b UPSTREAM: caif_virtio: fix race between virtio_device_ready() and ndo_open()
We currently depend on probe() calling virtio_device_ready() -
which happens after netdev
registration. Since ndo_open() can be called immediately
after register_netdev, this means there exists a race between
ndo_open() and virtio_device_ready(): the driver may start to use the
device (e.g. TX) before DRIVER_OK which violates the spec.

Fix this by switching to use register_netdevice() and protect the
virtio_device_ready() with rtnl_lock() to make sure ndo_open() can
only be called after virtio_device_ready().

Fixes: 0d2e1a2926 ("caif_virtio: Introduce caif over virtio")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220620051115.3142-3-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 11a37eb668)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7abe77d08c92c561676def322baf54fa1fce58a8
2022-07-01 20:24:03 +00:00
Jason Wang
b9cbf0fa67 UPSTREAM: virtio-net: fix race between ndo_open() and virtio_device_ready()
We currently call virtio_device_ready() after netdev
registration. Since ndo_open() can be called immediately
after register_netdev, this means there exists a race between
ndo_open() and virtio_device_ready(): the driver may start to use the
device before DRIVER_OK which violates the spec.

Fix this by switching to use register_netdevice() and protect the
virtio_device_ready() with rtnl_lock() to make sure ndo_open() can
only be called after virtio_device_ready().

Fixes: 4baf1e33d0 ("virtio_net: enable VQs early")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220617072949.30734-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 50c0ada627)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iab222236dcc22d51befa98831c5306264aea09e5
2022-07-01 20:24:03 +00:00
Jason Wang
5104213da6 UPSTREAM: virtio: disable notification hardening by default
We try to harden virtio device notifications in 8b4ec69d7e ("virtio:
harden vring IRQ"). It works with the assumption that the driver or
core can properly call virtio_device_ready() at the right
place. Unfortunately, this seems to be not true and uncover various
bugs of the existing drivers, mainly the issue of using
virtio_device_ready() incorrectly.

So let's add a Kconfig option and disable it by default. It gives
us time to fix the drivers and then we can consider re-enabling it.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220622012940.21441-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit c346dae4f3)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I614cddfdac6e456b7786d3949d7ec793720c4e14
2022-07-01 20:24:03 +00:00
Bo Liu
f9146ba081 UPSTREAM: virtio: Remove unnecessary variable assignments
In function vp_modern_probe(), "pci_dev" is initialized with the
value of "mdev->pci_dev", so assigning "pci_dev" to "mdev->pci_dev"
is unnecessary since they store the same value.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Message-Id: <20220617055952.5364-1-liubo03@inspur.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
(cherry picked from commit 03d9571706)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iac1a1f5d53f6514ff8bb97e6f85fdb63bbdd166d
2022-07-01 20:24:03 +00:00
huangjie.albert
d5dc8b022f UPSTREAM: virtio_ring : keep used_wrap_counter in vq->last_used_idx
the used_wrap_counter and the vq->last_used_idx may get
out of sync if they are separate assignment,and interrupt
might use an incorrect value to check for the used index.

for example:OOB access
ksoftirqd may consume the packet and it will call:
virtnet_poll
	-->virtnet_receive
		-->virtqueue_get_buf_ctx
			-->virtqueue_get_buf_ctx_packed
and in virtqueue_get_buf_ctx_packed:

vq->last_used_idx += vq->packed.desc_state[id].num;
if (unlikely(vq->last_used_idx >= vq->packed.vring.num)) {
         vq->last_used_idx -= vq->packed.vring.num;
         vq->packed.used_wrap_counter ^= 1;
}

if at the same time, there comes a vring interrupt,in vring_interrupt:
we will call:
vring_interrupt
	-->more_used
		-->more_used_packed
			-->is_used_desc_packed
in is_used_desc_packed, the last_used_idx maybe >= vq->packed.vring.num.
so this could case a memory out of bounds bug.

this patch is to keep the used_wrap_counter in vq->last_used_idx
so we can get the correct value to check for used index in interrupt.

v3->v4:
- use READ_ONCE/WRITE_ONCE to get/set vq->last_used_idx

v2->v3:
- add inline function to get used_wrap_counter and last_used
- when use vq->last_used_idx, only read once
  if vq->last_used_idx is read twice, the values can be inconsistent.
- use last_used_idx & ~(-(1 << VRING_PACKED_EVENT_F_WRAP_CTR))
  to get the all bits below VRING_PACKED_EVENT_F_WRAP_CTR

v1->v2:
- reuse the VRING_PACKED_EVENT_F_WRAP_CTR
- Remove parameter judgment in is_used_desc_packed,
because it can't be illegal

Signed-off-by: huangjie.albert <huangjie.albert@bytedance.com>
Message-Id: <20220617020411.80367-1-huangjie.albert@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit a7722890fd)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6589c086af4d1048921e8e325ba950c1ef657235
2022-07-01 20:24:03 +00:00
Parav Pandit
19b65fb9e9 UPSTREAM: vduse: Tie vduse mgmtdev and its device
vduse devices are not backed by any real devices such as PCI. Hence it
doesn't have any parent device linked to it.

Kernel driver model in [1] suggests to avoid an empty device
release callback.

Hence tie the mgmtdevice object's life cycle to an allocate dummy struct
device instead of static one.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/core-api/kobject.rst?h=v5.18-rc7#n284

Signed-off-by: Parav Pandit <parav@nvidia.com>
Message-Id: <20220613195223.473966-1-parav@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 0e0348ac3f)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I47bea6b5102209b0f2b32ae3306158330e0047ac
2022-07-01 20:24:03 +00:00
Eli Cohen
3051728004 UPSTREAM: vdpa/mlx5: Initialize CVQ vringh only once
Currently, CVQ vringh is initialized inside setup_virtqueues() which is
called every time a memory update is done. This is undesirable since it
resets all the context of the vring, including the available and used
indices.

Move the initialization to mlx5_vdpa_set_status() when
VIRTIO_CONFIG_S_DRIVER_OK is set.

Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220613075958.511064-2-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
(cherry picked from commit ace9252446)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I03105745cb12c261c49a4fdf4deb87780c035001
2022-07-01 20:24:03 +00:00
Eli Cohen
48a36966fc UPSTREAM: vdpa/mlx5: Update Control VQ callback information
The control VQ specific information is stored in the dedicated struct
mlx5_control_vq. When the callback is updated through
mlx5_vdpa_set_vq_cb(), make sure to update the control VQ struct.

Fixes: 5262912ef3 ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220613075958.511064-1-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com)
(cherry picked from commit 40f2f3e941)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4ef42d0ff2f8b3e5156b54473ebc5ebb877c22d2
2022-07-01 20:24:03 +00:00
Jason Wang
3063325104 UPSTREAM: vdpa: make get_vq_group and set_group_asid optional
This patch makes get_vq_group and set_group_asid optional. This is
needed to unbreak the vDPA parent that doesn't support multiple
address spaces.

Cc: Gautam Dawar <gautam.dawar@xilinx.com>
Fixes: aaca8373c4 ("vhost-vdpa: support ASID based IOTLB API")
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220609041901.2029-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 00d1f54647)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I83cce7173bc7ec6dd00479932d5515bfacb50fe1
2022-07-01 20:24:03 +00:00
Bo Liu
b9e82f6f75 UPSTREAM: virtio: Fix all occurences of the "the the" typo
There are double "the" in message in file virtio_mmio.c
and virtio_pci_modern_dev.c, fix it.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Message-Id: <20220609031106.2161-1-liubo03@inspur.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit acb0055e18)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6fdd050cb1e41a7e1b396b3bfbbdcad011cae877
2022-07-01 20:24:03 +00:00
Xie Yongji
de5826385d UPSTREAM: vduse: Fix NULL pointer dereference on sysfs access
The control device has no drvdata. So we will get a
NULL pointer dereference when accessing control
device's msg_timeout attribute via sysfs:

[ 132.841881][ T3644] BUG: kernel NULL pointer dereference, address: 00000000000000f8
[ 132.850619][ T3644] RIP: 0010:msg_timeout_show (drivers/vdpa/vdpa_user/vduse_dev.c:1271)
[ 132.869447][ T3644] dev_attr_show (drivers/base/core.c:2094)
[ 132.870215][ T3644] sysfs_kf_seq_show (fs/sysfs/file.c:59)
[ 132.871164][ T3644] ? device_remove_bin_file (drivers/base/core.c:2088)
[ 132.872082][ T3644] kernfs_seq_show (fs/kernfs/file.c:164)
[ 132.872838][ T3644] seq_read_iter (fs/seq_file.c:230)
[ 132.873578][ T3644] ? __vmalloc_area_node (mm/vmalloc.c:3041)
[ 132.874532][ T3644] kernfs_fop_read_iter (fs/kernfs/file.c:238)
[ 132.875513][ T3644] __kernel_read (fs/read_write.c:440 (discriminator 1))
[ 132.876319][ T3644] kernel_read (fs/read_write.c:459)
[ 132.877129][ T3644] kernel_read_file (fs/kernel_read_file.c:94)
[ 132.877978][ T3644] kernel_read_file_from_fd (include/linux/file.h:45 fs/kernel_read_file.c:186)
[ 132.879019][ T3644] __do_sys_finit_module (kernel/module.c:4207)
[ 132.879930][ T3644] __ia32_sys_finit_module (kernel/module.c:4189)
[ 132.880930][ T3644] do_int80_syscall_32 (arch/x86/entry/common.c:112 arch/x86/entry/common.c:132)
[ 132.881847][ T3644] entry_INT80_compat (arch/x86/entry/entry_64_compat.S:419)

To fix it, don't create the unneeded attribute for
control device anymore.

Fixes: c8a6153b6c ("vduse: Introduce VDUSE - vDPA Device in Userspace")
Reported-by: kernel test robot <oliver.sang@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Message-Id: <20220426073656.229-1-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit b27ee76c74)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ib9abf1e60e0dad878ba20f2c2987c443476925e9
2022-07-01 20:24:03 +00:00
Xie Yongji
fa4bbdf264 UPSTREAM: vringh: Fix loop descriptors check in the indirect cases
We should use size of descriptor chain to test loop condition
in the indirect case. And another statistical count is also introduced
for indirect descriptors to avoid conflict with the statistical count
of direct descriptors.

Fixes: f87d0fbb57 ("vringh: host-side implementation of virtio rings.")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Fam Zheng <fam.zheng@bytedance.com>
Message-Id: <20220505100910.137-1-xieyongji@bytedance.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit dbd29e0752)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I989cc3d74401507f6b9c282971e60ecb21785895
2022-07-01 20:24:03 +00:00
Dan Carpenter
6e2a35571a UPSTREAM: vdpa/mlx5: clean up indenting in handle_ctrl_vlan()
These lines were supposed to be indented.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <Yp71IYMP+QfuCJ8t@kili>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>
(cherry picked from commit f38b3c6a78)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I92310051004e413b6ffbf9f89e7e4ce939614fcf
2022-07-01 20:24:03 +00:00
Dan Carpenter
acdb4bfe37 UPSTREAM: vdpa/mlx5: fix error code for deleting vlan
Return success if we were able to delete a vlan.  The current code
always returns failure.

Fixes: baf2ad3f6a ("vdpa/mlx5: Add RX MAC VLAN filter support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Message-Id: <Yp709f1g9NcMBCHg@kili>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eli Cohen <elic@nvidia.com>
Acked-by: Si-Wei Liu <si-wei.liu@oracle.com>
(cherry picked from commit f766c409fc)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibaa57311cd2e123688f6261dc09bb547dd82c504
2022-07-01 20:24:03 +00:00
chengkaitao
2e977b72c0 UPSTREAM: virtio-mmio: fix missing put_device() when vm_cmdline_parent registration failed
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 <pilgrimtao@gmail.com>
Message-Id: <20220602005542.16489-1-chengkaitao@didiglobal.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit a58a7f97ba)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6ccf7cba3458dd3402ce0bb39d2b110a599ad7ee
2022-07-01 20:24:03 +00:00
Xiang wangx
5571a91668 UPSTREAM: vdpa/mlx5: Fix syntax errors in comments
Delete the redundant word 'is'.

Signed-off-by: Xiang wangx <wangxiang@cdjrlc.com>
Message-Id: <20220604143858.16073-1-wangxiang@cdjrlc.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
(cherry picked from commit 2f72b2262d)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I3a2338d51fc8c4b6e710c454c5b788cdc94fdde5
2022-07-01 20:24:03 +00:00
Jason Wang
a93860cda4 UPSTREAM: virtio-rng: make device ready before making request
Current virtio-rng does a entropy request before DRIVER_OK, this
violates the spec:

virtio spec requires that all drivers set DRIVER_OK
before using devices.

Further, kernel will ignore the interrupt after commit
8b4ec69d7e ("virtio: harden vring IRQ").

Fixing this by making device ready before the request.

Cc: stable@vger.kernel.org
Fixes: 8b4ec69d7e ("virtio: harden vring IRQ")
Fixes: f7f510ec19 ("virtio: An entropy device, as suggested by hpa.")
Reported-and-tested-by: syzbot+5b59d6d459306a556f54@syzkaller.appspotmail.com
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220608061422.38437-1-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
(cherry picked from commit 228432551b)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I09cf4df29b345372b484efe098af670709d6e739
2022-07-01 20:24:03 +00:00
Vincent Whitchurch
fe925e7db4 UPSTREAM: um: virt-pci: set device ready in probe()
Call virtio_device_ready() to make this driver work after commit
b4ec69d7e09 ("virtio: harden vring IRQ"), since the driver uses the
virtqueues in the probe function.  (The virtio core sets the device
ready when probe returns.)

Fixes: 8b4ec69d7e ("virtio: harden vring IRQ")
Fixes: 68f5d3f3b6 ("um: add PCI over virtio emulation driver")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Message-Id: <20220610151203.3492541-1-vincent.whitchurch@axis.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
(cherry picked from commit eacea84459)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If175f1a6a10e3f53afa89b9ae3f98cd6e6f99823
2022-07-01 20:24:03 +00:00
Treehugger Robot
93b7970e26 Merge "Merge 6e5f6a8691 ("Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost") into android-mainline" into android-mainline 2022-07-01 20:24:03 +00:00
Greg Kroah-Hartman
665530475d Merge 6e5f6a8691 ("Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iacbded03d6aa9a6d729d5bcf6fa6eed7a96a1d09
2022-07-01 15:36:01 +02:00
Greg Kroah-Hartman
435497317d Merge be83f04d25 ("virtio: allow to unbreak virtqueue") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Icfc6cca8e0cb5f02deb28f60ea448f1133934bf4
2022-07-01 15:30:27 +02:00
Greg Kroah-Hartman
cb3b6474ab Merge 3a232277c1 ("virtio-ccw: implement synchronize_cbs()") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I633944b3c3bc1ba0a58de16f575ebfadb72e9368
2022-07-01 11:40:35 +02:00
Greg Kroah-Hartman
118bfb38c8 Merge bda324fd03 ("vdpasim: control virtqueue support") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I6572031ce09e545a8bc5058be67fc96ee6aafc5a
2022-07-01 11:18:03 +02:00
Greg Kroah-Hartman
547d254a9d Merge 6f6ebb9899 ("Merge tag 'sound-fix-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibc7c8044476080b3a65d2cef9e3cb47f9a7588d6
2022-07-01 09:19:55 +02:00
Greg Kroah-Hartman
9b051650de Merge ab18b7b36a ("Merge tag 'drm-next-2022-06-03-1' of git://anongit.freedesktop.org/drm/drm") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ie3b5aa18baf83505c953f59bb69070b4889a43c0
2022-07-01 09:19:45 +02:00
Greg Kroah-Hartman
6ecbbf3e5b Merge 50fd82b3a9 ("Merge tag 'docs-5.19-2' of git://git.lwn.net/linux") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iaa2ffd8855335610547c83dcae56184d8f2c7429
2022-07-01 09:19:35 +02:00
Greg Kroah-Hartman
1ac03d8954 Merge baf86ac1c9 ("Merge tag 'asm-generic-fixes-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4e0c08cd408e606c1616fc0fc200a137b0aab82b
2022-07-01 09:19:22 +02:00
Carlos Llamas
88b166cbf2 ANDROID: gki_defconfig: enable IPV6_MROUTE
Enable support for IPv6 multicast forwarding, required for devices with
border routing capabilities. Note this option will likely be unset after
making ipv6 a GKI module.

Bug: 233821827
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I0ffabbe21373ac23bc353abda51862eba0135972
2022-06-30 13:45:46 +00:00
Guenter Roeck
d196788eda UPSTREAM: watchdog: gxp: Add missing MODULE_LICENSE
The build system says:

ERROR: modpost: missing MODULE_LICENSE() in drivers/watchdog/gxp-wdt.o

Add the missing MODULE_LICENSE.

Signed-off-by: Nick Hawkins <nick.hawkins@hpe.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/all/20220603131419.2948578-1-linux@roeck-us.net/
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
(cherry picked from commit b6c8cd80ac)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I517f21913374a6608e07462a319a0e07297b4e46
2022-06-29 20:18:55 +02:00
Greg Kroah-Hartman
df7fb96b9f Merge 09a018176b ("Merge tag 'arm-late-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I4973ce3f484afda5c90d1339cd4a8d68a8a8e769
2022-06-29 20:18:45 +02:00
Greg Kroah-Hartman
5c4ea62dc8 Merge 96479c0980 ("Merge tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc") into android-mainline
Steps on the way to 5.19-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Iad78a06b49ccde43bbb7becad2c0364502b48bb1
2022-06-29 20:12:12 +02:00