diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/maccess.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/maccess.c b/mm/maccess.c index 34fe24759ed1..1b13638d238d 100644 --- a/mm/maccess.c +++ b/mm/maccess.c @@ -13,6 +13,11 @@ * * Safely read from address @src to the buffer at @dst. If a kernel fault * happens, handle that and return -EFAULT. + * + * We ensure that the copy_from_user is executed in atomic context so that + * do_page_fault() doesn't attempt to take mmap_sem. This makes + * probe_kernel_read() suitable for use within regions where the caller + * already holds mmap_sem, or other locks which nest inside mmap_sem. */ long __weak probe_kernel_read(void *dst, const void *src, size_t size) |