Commit f8dcdf01 authored by H.J. Lu's avatar H.J. Lu Committed by H. Peter Anvin

uapi: Use __kernel_ulong_t in shmid64_ds/shminfo64/shm_info

Both x32 and x86-64 use the same struct shmid64_ds/shminfo64/shm_info for
system calls.  But x32 long is 32-bit. This patch replaces unsigned long
with __kernel_ulong_t in struct shmid64_ds/shminfo64/shm_info.
Signed-off-by: default avatarH.J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/r/1388182464-28428-8-git-send-email-hjl.tools@gmail.comSigned-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 38691659
...@@ -39,21 +39,21 @@ struct shmid64_ds { ...@@ -39,21 +39,21 @@ struct shmid64_ds {
#endif #endif
__kernel_pid_t shm_cpid; /* pid of creator */ __kernel_pid_t shm_cpid; /* pid of creator */
__kernel_pid_t shm_lpid; /* pid of last operator */ __kernel_pid_t shm_lpid; /* pid of last operator */
unsigned long shm_nattch; /* no. of current attaches */ __kernel_ulong_t shm_nattch; /* no. of current attaches */
unsigned long __unused4; __kernel_ulong_t __unused4;
unsigned long __unused5; __kernel_ulong_t __unused5;
}; };
struct shminfo64 { struct shminfo64 {
unsigned long shmmax; __kernel_ulong_t shmmax;
unsigned long shmmin; __kernel_ulong_t shmmin;
unsigned long shmmni; __kernel_ulong_t shmmni;
unsigned long shmseg; __kernel_ulong_t shmseg;
unsigned long shmall; __kernel_ulong_t shmall;
unsigned long __unused1; __kernel_ulong_t __unused1;
unsigned long __unused2; __kernel_ulong_t __unused2;
unsigned long __unused3; __kernel_ulong_t __unused3;
unsigned long __unused4; __kernel_ulong_t __unused4;
}; };
#endif /* __ASM_GENERIC_SHMBUF_H */ #endif /* __ASM_GENERIC_SHMBUF_H */
...@@ -68,11 +68,11 @@ struct shminfo { ...@@ -68,11 +68,11 @@ struct shminfo {
struct shm_info { struct shm_info {
int used_ids; int used_ids;
unsigned long shm_tot; /* total allocated shm */ __kernel_ulong_t shm_tot; /* total allocated shm */
unsigned long shm_rss; /* total resident shm */ __kernel_ulong_t shm_rss; /* total resident shm */
unsigned long shm_swp; /* total swapped shm */ __kernel_ulong_t shm_swp; /* total swapped shm */
unsigned long swap_attempts; __kernel_ulong_t swap_attempts;
unsigned long swap_successes; __kernel_ulong_t swap_successes;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment