linux-next: build failure after merge of the file-locks tree
Subsystems (3)
Hi Jeff,
After merging the file-locks tree, today's linux-next build (arm multi_v7_defconfig) failed like this:
fs/fcntl.c: In function 'SYSC_fcntl64':fs/fcntl.c:414:30: error: 'argp' undeclared (first use in this function)
if (copy_from_user(&flock, argp, sizeof(flock)))
^
fs/fcntl.c:414:30: note: each undeclared identifier is reported only once for each function it appears in
fs/fcntl.c:416:23: error: 'filp' undeclared (first use in this function)
err = fcntl_getlk64(filp, cmd, &flock);
^Caused by commit
0416b792294c ("fs/locks: pass kernel struct flock to fcntl_getlk/setlk")
This build has BITS_PER_LONG == 32.
I have used the file-locks tree from next-20170516 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 14 lines · Stephen Rothwell
Hi Jeff,
After merging the file-locks tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
fs/fcntl.c: In function 'SYSC_fcntl64':fs/fcntl.c:414:30: error: 'argp' undeclared (first use in this function)
if (copy_from_user(&flock, argp, sizeof(flock)))^ fs/fcntl.c:414:30: note: each undeclared identifier is reported only once for each function it appears in fs/fcntl.c:416:23: error: 'filp' undeclared (first use in this function) err = fcntl_getlk64(filp, cmd, &flock); ^
Quoted 8 lines
Caused by commit
0416b792294c("fs/locks: pass kernel struct flock to fcntl_getlk/setlk")This build has
BITS_PER_LONG== 32.I have used the file-locks tree from next-20170516 for today.
I think this patch will probably fix it, but I don't have a 32-bit host set up to build on just now. I'll go ahead and merge this into the branch, and will plan to test it tomorrow (hopefully before the next fetch).
------------------8<------------------
[PATCH] SQUASH: define argp properly in 32-bit fcntl64 syscall handler
...and use the right file pointer.
--- fs/fcntl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/fcntl.c +2 -1
@@ -391,6 +391,7 @@ SYSCALL_DEFINE3(fcntl, unsigned int, fd, unsigned int, cmd, unsigned long, arg) SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, unsigned long, arg) { +void __user *argp = (void __user *)arg;struct fd f =fdget_raw (fd);struct flock64 flock;long err = -EBADF ;
@@ -413,7 +414,7 @@ SYSCALL_DEFINE3(fcntl64, unsigned int, fd, unsigned int, cmd, err = -EFAULT ;if (copy_from_user (&flock, argp,sizeof (flock)))break ; - err =fcntl_getlk64 (filp, cmd, &flock); + err =fcntl_getlk64 (f.file, cmd, &flock);if (!err &©_to_user (argp, &flock,sizeof (flock))) err = -EFAULT ;break ;
Signature · 1 line
2.9.4
Hi Jeff,
Quoted 5 lines · On Tue, 16 May 2017 21:10:03 -0400 Jeff Layton <[email protected]> wrote:
I think this patch will probably fix it, but I don't have a 32-bit host set up to build on just now. I'll go ahead and merge this into the branch, and will plan to test it tomorrow (hopefully before the next fetch).
Thanks. If you don't get around to testing, I will let you know if it still fails tomorrow :-)
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Hi Jeff,
Quoted 1 line · On Tue, 16 May 2017 21:10:03 -0400 Jeff Layton <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
I think this patch will probably fix it, but I don't have a 32-bit host set up to build on just now. I'll go ahead and merge this into the branch, and will plan to test it tomorrow (hopefully before the next fetch).
Thanks. If you don't get around to testing, I will let you know if it still fails tomorrow :-)
Yep, that fixes it (at least on i386). I squashed it into patch 1 of Christoph's series. Please let me know if you see further problems.
Thanks!
Signature · 1 line
Jeff Layton <[email protected]>
Hi Jeff,
Quoted 10 lines · On Wed, 17 May 2017 08:32:46 -0400 Jeff Layton <[email protected]> wrote:
Quoted 8 lines · Stephen Rothwell
Quoted 5 lines · On Tue, 16 May 2017 21:10:03 -0400 Jeff Layton <[email protected]> wrote:
I think this patch will probably fix it, but I don't have a 32-bit host set up to build on just now. I'll go ahead and merge this into the branch, and will plan to test it tomorrow (hopefully before the next fetch).
Quoted 5 lines
Quoted 2 lines
Thanks. If you don't get around to testing, I will let you know if it still fails tomorrow :-)
Yep, that fixes it (at least on i386). I squashed it into patch 1 of Christoph's series. Please let me know if you see further problems.
Thanks, will do.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi Jeff,
Quoted 10 lines · On Wed, 17 May 2017 08:32:46 -0400 Jeff Layton <[email protected]> wrote:
Quoted 8 lines · Stephen Rothwell
Quoted 5 lines · On Tue, 16 May 2017 21:10:03 -0400 Jeff Layton <[email protected]> wrote:
I think this patch will probably fix it, but I don't have a 32-bit host set up to build on just now. I'll go ahead and merge this into the branch, and will plan to test it tomorrow (hopefully before the next fetch).
Quoted 5 lines
Quoted 2 lines
Thanks. If you don't get around to testing, I will let you know if it still fails tomorrow :-)
Yep, that fixes it (at least on i386). I squashed it into patch 1 of Christoph's series. Please let me know if you see further problems.
Looks good here as well.
Signature · 2 lines
Cheers, Stephen Rothwell