diff options
authorHelge Deller2013-02-04 13:39:52 -0600
committerGreg Kroah-Hartman2013-03-03 16:09:06 -0600
commit43f514598ad16af1c6dd08dd429631eaafef7849 (patch)
parent8a9279a5af607d9f59b3921c639df139a28bcef6 (diff)
unbreak automounter support on 64-bit kernel with 32-bit userspace (v2)
commit 4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf upstream. automount-support is broken on the parisc architecture, because the existing #if list does not include a check for defined(__hppa__). The HPPA (parisc) architecture is similiar to other 64bit Linux targets where we have to define autofs_wqt_t (which is passed back and forth to user space) as int type which has a size of 32bit across 32 and 64bit kernels. During the discussion on the mailing list, H. Peter Anvin suggested to invert the #if list since only specific platforms (specifically those who do not have a 32bit userspace, like IA64 and Alpha) should have autofs_wqt_t as unsigned long type. This suggestion is probably the best way to go, since Arm64 (and maybe others?) seems to have a non-working automounter. So in the long run even for other new upcoming architectures this inverted check seem to be the best solution, since it will not require them to change this #if again (unless they are 64bit only). Signed-off-by: Helge Deller <deller@gmx.de> Acked-by: H. Peter Anvin <hpa@zytor.com> Acked-by: Ian Kent <raven@themaw.net> Acked-by: Catalin Marinas <catalin.marinas@arm.com> CC: James Bottomley <James.Bottomley@HansenPartnership.com> CC: Rolf Eike Beer <eike-kernel@sf-tec.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 files changed, 8 insertions, 17 deletions
diff --git a/include/linux/auto_fs.h b/include/linux/auto_fs.h
index da64e15004b..6cdabb422de 100644
--- a/include/linux/auto_fs.h
+++ b/include/linux/auto_fs.h
@@ -31,25 +31,16 @@
32 32
33/* 33/*
34 * Architectures where both 32- and 64-bit binaries can be executed 34 * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
35 * on 64-bit kernels need this. This keeps the structure format 35 * back to the kernel via ioctl from userspace. On architectures where 32- and
36 * uniform, and makes sure the wait_queue_token isn't too big to be 36 * 64-bit userspace binaries can be executed it's important that the size of
37 * passed back down to the kernel. 37 * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
38 * 38 * do not break the binary ABI interface by changing the structure size.
39 * This assumes that on these architectures:
40 * mode 32 bit 64 bit
41 * -------------------------
42 * int 32 bit 32 bit
43 * long 32 bit 64 bit
44 *
45 * If so, 32-bit user-space code should be backwards compatible.
46 */ 39 */
47 40#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */
48#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
49 || defined(__powerpc__) || defined(__s390__)
50typedef unsigned int autofs_wqt_t;
52typedef unsigned long autofs_wqt_t; 41typedef unsigned long autofs_wqt_t;
43typedef unsigned int autofs_wqt_t;
53#endif 44#endif
54 45
55/* Packet types */ 46/* Packet types */