Messages in this thread | | | Date | Thu, 16 Apr 2020 08:43:11 +0200 | From | Greg KH <> | Subject | Re: [PATCH 3/3] kernel: set USER_DS in kthread_use_mm |
| |
On Thu, Apr 16, 2020 at 07:31:58AM +0200, Christoph Hellwig wrote: > 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> > Acked-by: Michael S. Tsirkin <mst@redhat.com> [vhost] > ---
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [usb]
| |