projects
/
wrapfs-2.6.36.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e76afd
)
io_uring: implement compat handling for IORING_REGISTER_IOWQ_AFF
author
Eugene Syromiatnikov
<esyr@redhat.com>
Wed, 6 Apr 2022 11:55:33 +0000
(13:55 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 17:27:36 +0000
(19:27 +0200)
commit
0f5e4b83b37a96e3643951588ed7176b9b187c0a
upstream.
Similarly to the way it is done im mbind syscall.
Cc: stable@vger.kernel.org # 5.14
Fixes: fe76421d1da1dcdb ("io_uring: allow user configurable IO thread CPU affinity")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 229e2b2ef1c53e7e55c7dcbab619456638ed3149..8eb7386a325185f9e2117f58425804ad8410a469 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-10860,7
+10860,15
@@
static __cold int io_register_iowq_aff(struct io_ring_ctx *ctx,
if (len > cpumask_size())
len = cpumask_size();
- if (copy_from_user(new_mask, arg, len)) {
+ if (in_compat_syscall()) {
+ ret = compat_get_bitmap(cpumask_bits(new_mask),
+ (const compat_ulong_t __user *)arg,
+ len * 8 /* CHAR_BIT */);
+ } else {
+ ret = copy_from_user(new_mask, arg, len);
+ }
+
+ if (ret) {
free_cpumask_var(new_mask);
return -EFAULT;
}