userfaultfdv4.2 update for -mm
Subsystems (2)
PATCH 1/1 userfaultfdv4.2 update for -mm
Oops there was a leftover _irq, now I also checked there's no other irq leftover, the word "irq" disappeared from the file.
The patch applies at the end but ideally should be moved earlier (anywhere before the patch that activates the syscall).
Thanks,
Andrea
Andrea Arcangeli (1):
userfaultfd: cleanup superfluous _irq locking
fs/userfaultfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
PATCH 1/1 userfaultfd: cleanup superfluous _irq locking
This leftover shouldn't have caused any malfunction because the loop either schedules or it re-enables irqs immediately and schedule() doesn't seem to BUG_ON(irqs_disabled()). However lately we've been using the non blocking model so the schedule isn't really exercised here. Regardless of the side effects this must be fixed as it's not ok to enter schedule with irq disabled and it's not beneficial to toggle irqs in the first place.
--- fs/userfaultfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/userfaultfd.c +2 -2
@@ -558,11 +558,11 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait, }spin_unlock (&ctx->fd_wqh.lock);schedule (); -spin_lock_irq (&ctx->fd_wqh.lock); +spin_lock (&ctx->fd_wqh.lock); }__remove_wait_queue (&ctx->fd_wqh, &wait);__set_current_state (TASK_RUNNING ); -spin_unlock_irq (&ctx->fd_wqh.lock); +spin_unlock (&ctx->fd_wqh.lock);return ret; }
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>