search for: cur_mm

Displaying 8 results from an estimated 8 matches for "cur_mm".

2020 Apr 04
0
[PATCH 5/6] kernel: better document the use_mm/unuse_mm API contract
...tic int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr, err = -EFAULT; goto fail_req; } - use_mm(ctx->sqo_mm); + kthread_use_mm(ctx->sqo_mm); *mm = ctx->sqo_mm; } @@ -5911,7 +5911,7 @@ static int io_sq_thread(void *data) * may sleep. */ if (cur_mm) { - unuse_mm(cur_mm); + kthread_unuse_mm(cur_mm); mmput(cur_mm); cur_mm = NULL; } @@ -5987,7 +5987,7 @@ static int io_sq_thread(void *data) set_fs(old_fs); if (cur_mm) { - unuse_mm(cur_mm); + kthread_unuse_mm(cur_mm); mmput(cur_mm); } revert_creds(old_cred); diff...
2020 Apr 16
0
[PATCH 2/3] kernel: better document the use_mm/unuse_mm API contract
...tic int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr, err = -EFAULT; goto fail_req; } - use_mm(ctx->sqo_mm); + kthread_use_mm(ctx->sqo_mm); *mm = ctx->sqo_mm; } @@ -5948,7 +5948,7 @@ static int io_sq_thread(void *data) * may sleep. */ if (cur_mm) { - unuse_mm(cur_mm); + kthread_unuse_mm(cur_mm); mmput(cur_mm); cur_mm = NULL; } @@ -6025,7 +6025,7 @@ static int io_sq_thread(void *data) set_fs(old_fs); if (cur_mm) { - unuse_mm(cur_mm); + kthread_unuse_mm(cur_mm); mmput(cur_mm); } revert_creds(old_cred); diff...
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 04
0
[PATCH 6/6] kernel: set USER_DS in kthread_use_mm
...ork->mm; /* hang on to this mm */ work->mm = NULL; diff --git a/fs/io_uring.c b/fs/io_uring.c index 367406381044..c332a34e8b34 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5871,15 +5871,12 @@ static int io_sq_thread(void *data) struct io_ring_ctx *ctx = data; struct mm_struct *cur_mm = NULL; const struct cred *old_cred; - mm_segment_t old_fs; DEFINE_WAIT(wait); unsigned long timeout; int ret = 0; complete(&ctx->completions[1]); - old_fs = get_fs(); - set_fs(USER_DS); old_cred = override_creds(ctx->creds); timeout = jiffies + ctx->sq_thread_idle;...
2020 Apr 16
0
[PATCH 3/3] kernel: set USER_DS in kthread_use_mm
...ork->mm; /* hang on to this mm */ work->mm = NULL; diff --git a/fs/io_uring.c b/fs/io_uring.c index 8a8148512da7..40f90b98a18a 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5908,15 +5908,12 @@ static int io_sq_thread(void *data) struct io_ring_ctx *ctx = data; struct mm_struct *cur_mm = NULL; const struct cred *old_cred; - mm_segment_t old_fs; DEFINE_WAIT(wait); unsigned long timeout; int ret = 0; complete(&ctx->completions[1]); - old_fs = get_fs(); - set_fs(USER_DS); old_cred = override_creds(ctx->creds); timeout = jiffies + ctx->sq_thread_idle;...
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio
2020 Apr 16
8
improve use_mm / unuse_mm v2
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API. Changes since v1: - drop a few patches - fix a comment typo - cover the newly merged use_mm/unuse_mm caller in vfio