OpenCloudOS-Kernel/drivers/usb
Christoph Hellwig 37c54f9bd4 kernel: set USER_DS in kthread_use_mm
Some architectures like arm64 and s390 require USER_DS to be set for
kernel threads to access user address space, which is the whole purpose of
kthread_use_mm, but other like x86 don't.  That has lead to a huge mess
where some callers are fixed up once they are tested on said
architectures, while others linger around and yet other like io_uring try
to do "clever" optimizations for what usually is just a trivial asignment
to a member in the thread_struct for most architectures.

Make kthread_use_mm set USER_DS, and kthread_unuse_mm restore to the
previous value instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: Zhi Wang <zhi.a.wang@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: http://lkml.kernel.org/r/20200404094101.672954-7-hch@lst.de
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-06-10 19:14:18 -07:00
..
atm USB: atm: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
c67x00 USB: c67x00: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
cdns3 USB: changes for v5.8 merge window 2020-05-25 13:28:20 +02:00
chipidea - Some improvments for ci_hdrc_usb2.c 2020-05-26 10:27:14 +02:00
class CDC-ACM: heed quirk also in error handling 2020-05-27 10:25:40 +02:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-10 11:41:20 +01:00
core USB/PHY driver updates for 5.8-rc1 2020-06-07 09:42:16 -07:00
dwc2 usb: dwc2: Update Core Reset programming flow. 2020-05-25 11:09:44 +03:00
dwc3 usb: dwc3: meson-g12a: fix USB2 PHY initialization on G12A and A1 SoCs 2020-05-29 12:21:26 +02:00
early Merge 5.7-rc3 into usb-next 2020-04-27 09:32:30 +02:00
gadget kernel: set USER_DS in kthread_use_mm 2020-06-10 19:14:18 -07:00
host USB/PHY driver updates for 5.8-rc1 2020-06-07 09:42:16 -07:00
image Merge 5.4-rc3 into usb-next 2019-10-14 07:09:59 +02:00
isp1760 USB: isp1760: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
misc Merge 5.7-rc3 into usb-next 2020-04-27 09:32:30 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 USB: mtu3: Use the correct style for SPDX License Identifier 2020-05-25 11:09:37 +03:00
musb usb: musb: Fix runtime PM imbalance on error 2020-05-25 13:36:31 +02:00
phy Merge 5.7-rc6 into usb-next 2020-05-18 07:55:55 +02:00
renesas_usbhs usb: renesas_usbhs: Use the correct style for SPDX License Identifier 2020-05-25 11:09:38 +03:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial USB-serial fixes for 5.8-rc1 2020-05-29 10:32:04 +02:00
storage sierra-ms: do not call scsi_get_host_dev() 2020-05-13 14:20:00 +02:00
typec USB/PHY driver updates for 5.8-rc1 2020-06-07 09:42:16 -07:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-17 16:36:33 +01:00
Kconfig usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00