Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'locks-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux

Pull file locking update from Jeff Layton:
"A couple of fixes for a patch that went into v4.14, and the bug report
just came in a few days ago.. It passes my (minimal) testing, and has
been in linux-next for a few days now.

I also would like to get my address changed in MAINTAINERS to clear
that hurdle"

* tag 'locks-v4.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux:
fcntl: don't cap l_start and l_end values for F_GETLK64 in compat syscall
fcntl: don't leak fd reference when fixup_compat_flock fails
MAINTAINERS: s/jlayton@poochiereds.net/jlayton@kernel.org/

+10 -20
+3 -3
MAINTAINERS
··· 5216 5216 F: include/video/s1d13xxxfb.h 5217 5217 5218 5218 ERRSEQ ERROR TRACKING INFRASTRUCTURE 5219 - M: Jeff Layton <jlayton@poochiereds.net> 5219 + M: Jeff Layton <jlayton@kernel.org> 5220 5220 S: Maintained 5221 5221 F: lib/errseq.c 5222 5222 F: include/linux/errseq.h ··· 5404 5404 F: include/uapi/scsi/fc/ 5405 5405 5406 5406 FILE LOCKING (flock() and fcntl()/lockf()) 5407 - M: Jeff Layton <jlayton@poochiereds.net> 5407 + M: Jeff Layton <jlayton@kernel.org> 5408 5408 M: "J. Bruce Fields" <bfields@fieldses.org> 5409 5409 L: linux-fsdevel@vger.kernel.org 5410 5410 S: Maintained ··· 7550 7550 7551 7551 KERNEL NFSD, SUNRPC, AND LOCKD SERVERS 7552 7552 M: "J. Bruce Fields" <bfields@fieldses.org> 7553 - M: Jeff Layton <jlayton@poochiereds.net> 7553 + M: Jeff Layton <jlayton@kernel.org> 7554 7554 L: linux-nfs@vger.kernel.org 7555 7555 W: http://nfs.sourceforge.net/ 7556 7556 T: git git://linux-nfs.org/~bfields/linux.git
-1
arch/arm64/include/asm/compat.h
··· 215 215 } compat_siginfo_t; 216 216 217 217 #define COMPAT_OFF_T_MAX 0x7fffffff 218 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 219 218 220 219 /* 221 220 * A pointer passed in from user mode. This should not
-1
arch/mips/include/asm/compat.h
··· 200 200 } compat_siginfo_t; 201 201 202 202 #define COMPAT_OFF_T_MAX 0x7fffffff 203 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 204 203 205 204 /* 206 205 * A pointer passed in from user mode. This should not
-1
arch/parisc/include/asm/compat.h
··· 195 195 } compat_siginfo_t; 196 196 197 197 #define COMPAT_OFF_T_MAX 0x7fffffff 198 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 199 198 200 199 struct compat_ipc64_perm { 201 200 compat_key_t key;
-1
arch/powerpc/include/asm/compat.h
··· 185 185 } compat_siginfo_t; 186 186 187 187 #define COMPAT_OFF_T_MAX 0x7fffffff 188 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 189 188 190 189 /* 191 190 * A pointer passed in from user mode. This should not
-1
arch/s390/include/asm/compat.h
··· 263 263 #define si_overrun _sifields._timer._overrun 264 264 265 265 #define COMPAT_OFF_T_MAX 0x7fffffff 266 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 267 266 268 267 /* 269 268 * A pointer passed in from user mode. This should not
-1
arch/sparc/include/asm/compat.h
··· 209 209 } compat_siginfo_t; 210 210 211 211 #define COMPAT_OFF_T_MAX 0x7fffffff 212 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 213 212 214 213 /* 215 214 * A pointer passed in from user mode. This should not
-1
arch/tile/include/asm/compat.h
··· 173 173 } compat_siginfo_t; 174 174 175 175 #define COMPAT_OFF_T_MAX 0x7fffffff 176 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 177 176 178 177 struct compat_ipc64_perm { 179 178 compat_key_t key;
-1
arch/x86/include/asm/compat.h
··· 210 210 } compat_siginfo_t; 211 211 212 212 #define COMPAT_OFF_T_MAX 0x7fffffff 213 - #define COMPAT_LOFF_T_MAX 0x7fffffffffffffffL 214 213 215 214 struct compat_ipc64_perm { 216 215 compat_key_t key;
+7 -9
fs/fcntl.c
··· 563 563 { 564 564 struct compat_flock64 fl; 565 565 566 + BUILD_BUG_ON(sizeof(kfl->l_start) > sizeof(ufl->l_start)); 567 + BUILD_BUG_ON(sizeof(kfl->l_len) > sizeof(ufl->l_len)); 568 + 566 569 memset(&fl, 0, sizeof(struct compat_flock64)); 567 570 copy_flock_fields(&fl, kfl); 568 571 if (copy_to_user(ufl, &fl, sizeof(struct compat_flock64))) ··· 635 632 if (err) 636 633 break; 637 634 err = fixup_compat_flock(&flock); 638 - if (err) 639 - return err; 640 - err = put_compat_flock(&flock, compat_ptr(arg)); 635 + if (!err) 636 + err = put_compat_flock(&flock, compat_ptr(arg)); 641 637 break; 642 638 case F_GETLK64: 643 639 case F_OFD_GETLK: ··· 644 642 if (err) 645 643 break; 646 644 err = fcntl_getlk(f.file, convert_fcntl_cmd(cmd), &flock); 647 - if (err) 648 - break; 649 - err = fixup_compat_flock(&flock); 650 - if (err) 651 - return err; 652 - err = put_compat_flock64(&flock, compat_ptr(arg)); 645 + if (!err) 646 + err = put_compat_flock64(&flock, compat_ptr(arg)); 653 647 break; 654 648 case F_SETLK: 655 649 case F_SETLKW: