OSDN Git Service

mm: userfaultfd: add new UFFDIO_POISON ioctl: fix
authorHugh Dickins <hughd@google.com>
Wed, 12 Jul 2023 01:27:17 +0000 (18:27 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:17 +0000 (10:12 -0700)
commit597425df4fecd272ca48f73feca7833433c16e12
treea45e941c49a6836ecda3d92f2a632c3f2b90cca3
parentfc71884a5f599a603fcc3c2b28b3872c09d19c18
mm: userfaultfd: add new UFFDIO_POISON ioctl: fix

Smatch has observed that pte_offset_map_lock() is now allowed to fail, and
then ptl should not be unlocked.  Use -EAGAIN here like elsewhere.

Link: https://lkml.kernel.org/r/bc7bba61-d34f-ad3a-ccf1-c191585ef851@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/userfaultfd.c