"size" field and everything after in banner isn't aligned properly on 64-bit archs.
Before:
key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime
0 0 0 4194304 4749 0 0 1000 1000 1000 1000 0 0 1208902917
After:
key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime
0 0 0 4194304 4745 0 0 1000 1000 1000 1000 0 0 1208902637
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
ipc/shm.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -106,9 +106,14 @@ void shm_exit_ns(struct ipc_namespace *ns)
void __init shm_init (void)
{
+ char *banner;
+
shm_init_ns(&init_ipc_ns);
- ipc_init_proc_interface("sysvipc/shm",
- " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n",
+ if (sizeof(size_t) <= sizeof(int))
+ banner = " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n";
+ else
+ banner = " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime\n";
+ ipc_init_proc_interface("sysvipc/shm", banner,
IPC_SHM_IDS, sysvipc_shm_proc_show);
}
--
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Linus Torvalds | Linux 2.6.27-rc5 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| David Miller | Slow DOWN, please!!! |
git: | |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Natalie Protasevich | [BUG] New Kernel Bugs |
