From: Eric W. Biederman Date: Mon, 12 Feb 2007 08:52:10 +0000 (-0800) Subject: [PATCH] ipc: save the ipc namespace while reading proc files X-Git-Tag: v2.6.21-rc1~274^2~186 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc1fc6d88c646ea071de34250552051a63000d70;p=pandora-kernel.git [PATCH] ipc: save the ipc namespace while reading proc files The problem we were assuming that current->nsproxy->ipc_ns would never change while someone has our file in /proc/sysvipc/ file open. Given that this can change with both unshare and by passing the file descriptor to another process that assumption is occasionally wrong. Therefore this patch causes /proc/sysvipc/* to cache the namespace and increment it's count when we open the file and to decrement the count when we close the file, ensuring consistent operation with no surprises. Signed-off-by: Eric W. Biederman Cc: Serge E. Hallyn Cc: Herbert Poetzl Cc: Kirill Korotaev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed