ANDROID: userfaultfd: Fix merge resolution: validate_range()
On the android12-5.10 branch, commit4a5cf92412
("BACKPORT: FROMGIT: userfaultfd: add UFFDIO_CONTINUE ioctl") added a new call site for the function validate_range(). Meanwhile, on the 5.10 stable branch, commit0b591c020d
("userfaultfd: do not untag user pointers") changed the function signature of validate_range() and updated all call sites accordingly. However, since these two commits happened on different branches, the new call site in userfaultfd_continue() has not been updated accordingly. This has arguably been missed in the merge commit66379c1ee5
("Merge tag 'android12-5.10.66_r00' into android12-5.10"). This patch fixes the following build breakage ./common/fs/userfaultfd.c:1875:32: error: incompatible pointer to integer conversion passing '__u64 *' (aka 'unsigned long long *') to parameter of type '__u64' (aka 'unsigned long long'); remove & [-Werror,-Wint-conversion] ret = validate_range(ctx->mm, &uffdio_continue.range.start, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./common/fs/userfaultfd.c:1245:14: note: passing argument to parameter 'start' here __u64 start, __u64 len) ^ 1 error generated. Fixes:66379c1ee5
("Merge tag 'android12-5.10.66_r00' into android12-5.10") Signed-off-by: Aaron Ding <aaronding@google.com> Signed-off-by: Daniel Mentz <danielmentz@google.com> Signed-off-by: Elliot Berman <quic_eberman@quicinc.com> Change-Id: I7ad40df213897314c439480f22a2ef4712e84025 (cherry picked from commit 5ec931a85350cd1914f53949d32214583421e155)
This commit is contained in:

committed by
Elliot Berman

parent
09bd9e940e
commit
2ccbb92f7f
@@ -1872,7 +1872,7 @@ static int userfaultfd_continue(struct userfaultfd_ctx *ctx, unsigned long arg)
|
|||||||
sizeof(uffdio_continue) - (sizeof(__s64))))
|
sizeof(uffdio_continue) - (sizeof(__s64))))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret = validate_range(ctx->mm, &uffdio_continue.range.start,
|
ret = validate_range(ctx->mm, uffdio_continue.range.start,
|
||||||
uffdio_continue.range.len);
|
uffdio_continue.range.len);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto out;
|
goto out;
|
||||||
|
Reference in New Issue
Block a user