summaryrefslogtreecommitdiffstats
path: root/sys/compat/freebsd32
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2012-01-17 01:08:01 +0000
committermckusick <mckusick@FreeBSD.org>2012-01-17 01:08:01 +0000
commitaf2e331939df2a83069ad4a6f5ab17eea9f82e8b (patch)
treed86ee8d3b7ab24d269286610b64ea734ff3b46d3 /sys/compat/freebsd32
parentbf2ee27f25b4986447b996be48d5f5ce77c3ec40 (diff)
downloadFreeBSD-src-af2e331939df2a83069ad4a6f5ab17eea9f82e8b.zip
FreeBSD-src-af2e331939df2a83069ad4a6f5ab17eea9f82e8b.tar.gz
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
Diffstat (limited to 'sys/compat/freebsd32')
-rw-r--r--sys/compat/freebsd32/freebsd32_misc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c
index 9390bc6..aff280a 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;
OpenPOWER on IntegriCloud