diff options
author | Christoph Hellwig <[email protected]> | 2020-06-10 18:42:10 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-06-10 19:14:18 -0700 |
commit | 37c54f9bd48663f7657a9178fe08c47e4f5b537b (patch) | |
tree | ba38e9216da172c16c4beafa97a882fc85f86068 /scripts/gdb/linux/tasks.py | |
parent | f5678e7f2ac31c270334b936352f0ef2fe7dd2b3 (diff) |
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Jens Axboe <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Felix Kuehling <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions