It was harmless, but 32bit kernel builds would emit warnings if not passing through an (unsigned long) cast of the pointer, before storing it in a __u64. Warning found by the kbuild test robot. Signed-off-by: Andrea Arcangeli <aarcange@xxxxxxxxxx> --- fs/userfaultfd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c index 09e8d5b..6fe0efd 100644 --- a/fs/userfaultfd.c +++ b/fs/userfaultfd.c @@ -545,7 +545,7 @@ static int dup_fctx(struct userfaultfd_fork_ctx *fctx) msg_init(&ewq.msg); ewq.msg.event = UFFD_EVENT_FORK; - ewq.msg.arg.reserved.reserved1 = (__u64)fctx->new; + ewq.msg.arg.reserved.reserved1 = (unsigned long)fctx->new; return userfaultfd_event_wait_completion(ctx, &ewq); } @@ -799,7 +799,9 @@ static ssize_t userfaultfd_ctx_read(struct userfaultfd_ctx *ctx, int no_wait, *msg = uwq->msg; if (uwq->msg.event == UFFD_EVENT_FORK) { - fork_nctx = (struct userfaultfd_ctx *)uwq->msg.arg.reserved.reserved1; + fork_nctx = (struct userfaultfd_ctx *) + (unsigned long) + uwq->msg.arg.reserved.reserved1; list_move(&uwq->wq.task_list, &fork_event); spin_unlock(&ctx->event_wqh.lock); ret = 0; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>