]> git.baikalelectronics.ru Git - kernel.git/commit
gup: avoid multiple user access locking/unlocking in fault_in_{read/write}able
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Fri, 14 Jan 2022 22:05:13 +0000 (14:05 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 15 Jan 2022 14:30:26 +0000 (16:30 +0200)
commit4af10e0f1267d1afafb38d8762b03c09ef029146
tree663d5a0a7a5fade5b9edaeb0c7ef16fd320b0d23
parent9f08414289a127274e3587d159cdb6ee91d4829b
gup: avoid multiple user access locking/unlocking in fault_in_{read/write}able

fault_in_readable() and fault_in_writeable() perform __get_user() and
__put_user() in a loop, implying multiple user access locking/unlocking.

To avoid that, use user access blocks.

Link: https://lkml.kernel.org/r/720dcf79314acca1a78fae56d478cc851952149d.1637084492.git.christophe.leroy@csgroup.eu
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/gup.c