diff options
author | Kirk McKusick <mckusick@FreeBSD.org> | 2012-01-17 01:08:01 +0000 |
---|---|---|
committer | Kirk McKusick <mckusick@FreeBSD.org> | 2012-01-17 01:08:01 +0000 |
commit | cc672d3599a56c72def9d5f90ad53d2366ce321a (patch) | |
tree | d86ee8d3b7ab24d269286610b64ea734ff3b46d3 /sys/compat/freebsd32/freebsd32_misc.c | |
parent | 8d01a3b28164abccb978ea0993550be4da568b28 (diff) | |
download | src-cc672d3599a56c72def9d5f90ad53d2366ce321a.tar.gz src-cc672d3599a56c72def9d5f90ad53d2366ce321a.zip |
Make sure all intermediate variables holding mount flags (mnt_flag)
and that all internal kernel calls passing mount flags are declared
as uint64_t so that flags in the top 32-bits are not lost.
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=230249
Diffstat (limited to 'sys/compat/freebsd32/freebsd32_misc.c')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 9390bc6a70a3..aff280ad0b7d 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2485,9 +2485,17 @@ freebsd32_nmount(struct thread *td, } */ *uap) { struct uio *auio; + uint64_t flags; int error; - AUDIT_ARG_FFLAGS(uap->flags); + /* + * Mount flags are now 64-bits. On 32-bit archtectures only + * 32-bits are passed in, but from here on everything handles + * 64-bit flags correctly. + */ + flags = uap->flags; + + AUDIT_ARG_FFLAGS(flags); /* * Filter out MNT_ROOTFS. We do not want clients of nmount() in @@ -2496,7 +2504,7 @@ freebsd32_nmount(struct thread *td, * MNT_ROOTFS should only be set by the kernel when mounting its * root file system. */ - uap->flags &= ~MNT_ROOTFS; + flags &= ~MNT_ROOTFS; /* * check that we have an even number of iovec's @@ -2508,7 +2516,7 @@ freebsd32_nmount(struct thread *td, error = freebsd32_copyinuio(uap->iovp, uap->iovcnt, &auio); if (error) return (error); - error = vfs_donmount(td, uap->flags, auio); + error = vfs_donmount(td, flags, auio); free(auio, M_IOV); return error; |