Commit:     30475cc12a50816f290828fb7e3cd7036cd622df
Parent:     dd08c40e3e23f868eb0e49f638eb208736ec7e66
Author:     Badari Pulavarty <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 16 10:15:59 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sat Jun 16 13:16:15 2007 -0700

    Restore shmid as inode# to fix /proc/pid/maps ABI breakage
    shmid used to be stored as inode# for shared memory segments. Some of
    the proc-ps tools use this from /proc/pid/maps.  Recent cleanups
    to newseg() changed it.  This patch sets inode number back to shared
    memory id to fix breakage.
    Signed-off-by: Badari Pulavarty <[EMAIL PROTECTED]>
    Cc: "Albert Cahalan" <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 ipc/shm.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ipc/shm.c b/ipc/shm.c
index 4fefbad..02faa54 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -397,6 +397,11 @@ static int newseg (struct ipc_namespace *ns, key_t key, 
int shmflg, size_t size)
        shp->shm_nattch = 0;
        shp->id = shm_buildid(ns, id, shp->shm_perm.seq);
        shp->shm_file = file;
+       /*
+        * shmid gets reported as "inode#" in /proc/pid/maps.
+        * proc-ps tools use this. Changing this will break them.
+        */
+       file->f_dentry->d_inode->i_ino = shp->id;
        ns->shm_tot += numpages;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to