diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-03 15:44:38 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-03 15:44:38 +0300 |
commit | 824adf37ee9ddf3ecba1bc245507bc5953dda268 (patch) | |
tree | ee85366f9e2c019b58492558d8ad406df35fd260 /drivers/virt/nitro_enclaves | |
parent | f2ee4759fb700b32a1bd830960fe86bf6bdfd0ab (diff) | |
parent | c9e6606c7fe92b50a02ce51dda82586ebdf99b48 (diff) | |
download | linux-824adf37ee9ddf3ecba1bc245507bc5953dda268.tar.xz |
Merge 5.16-rc8 into char-misc-next
We need the fixes in here as well for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virt/nitro_enclaves')
-rw-r--r-- | drivers/virt/nitro_enclaves/ne_misc_dev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/virt/nitro_enclaves/ne_misc_dev.c b/drivers/virt/nitro_enclaves/ne_misc_dev.c index 51ba4caeef23..20c881b6a4b6 100644 --- a/drivers/virt/nitro_enclaves/ne_misc_dev.c +++ b/drivers/virt/nitro_enclaves/ne_misc_dev.c @@ -963,8 +963,9 @@ static int ne_set_user_memory_region_ioctl(struct ne_enclave *ne_enclave, goto put_pages; } - gup_rc = get_user_pages(mem_region.userspace_addr + memory_size, 1, FOLL_GET, - ne_mem_region->pages + i, NULL); + gup_rc = get_user_pages_unlocked(mem_region.userspace_addr + memory_size, 1, + ne_mem_region->pages + i, FOLL_GET); + if (gup_rc < 0) { rc = gup_rc; |