mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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]>
This commit is contained in:
parent
dd08c40e3e
commit
30475cc12a
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
shm_unlock(shp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue