Hi all,

After merging the akpm tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

mm/madvise.c: In function '__do_sys_process_madvise':
mm/madvise.c:1194:9: error: implicit declaration of function 
'compat_import_iovec'; did you mean 'import_iovec'? 
[-Werror=implicit-function-declaration]
 1194 |   ret = compat_import_iovec(READ,
      |         ^~~~~~~~~~~~~~~~~~~
      |         import_iovec

Caused by commits

  b50ef3fed31c ("mm/madvise: introduce process_madvise() syscall: an external 
memory hinting API")
  84b51d510a77 ("mm: do not use helper functions for process_madvise")

interacting with commit

  e42ff3fae0a2 ("iov_iter: transparently handle compat iovecs in import_iovec")

from the vfs tree.

I have applied the folloing patch for today:

From: Stephen Rothwell <s...@canb.auug.org.au>
Date: Mon, 28 Sep 2020 21:14:11 +1000
Subject: [PATCH] fix up for "iov_iter: transparently handle compat iovecs in
 import_iovec"

Signed-off-by: Stephen Rothwell <s...@canb.auug.org.au>
---
 mm/madvise.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/mm/madvise.c b/mm/madvise.c
index 935dbc92e626..416a56b8e757 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -7,7 +7,6 @@
  */
 
 #include <linux/mman.h>
-#include <linux/compat.h>
 #include <linux/pagemap.h>
 #include <linux/syscalls.h>
 #include <linux/mempolicy.h>
@@ -1189,15 +1188,7 @@ SYSCALL_DEFINE5(process_madvise, int, pidfd, const 
struct iovec __user *, vec,
                goto out;
        }
 
-#ifdef CONFIG_COMPAT
-       if (in_compat_syscall())
-               ret = compat_import_iovec(READ,
-                               (struct compat_iovec __user *)vec, vlen,
-                               ARRAY_SIZE(iovstack), &iov, &iter);
-       else
-#endif
-               ret = import_iovec(READ, vec, vlen, ARRAY_SIZE(iovstack),
-                               &iov, &iter);
+       ret = import_iovec(READ, vec, vlen, ARRAY_SIZE(iovstack), &iov, &iter);
        if (ret < 0)
                goto out;
 
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

Attachment: pgpMixG4Tmm61.pgp
Description: OpenPGP digital signature

Reply via email to