X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=ipc%2Fnamespace.c;h=9171d948751e72c6c0c8fa1b8e60688ba4384a0c;hb=a5bfc4714b3f01365aef89a92673f2ceb1ccf246;hp=f7a35be2e7718ce72a1510fb80f301d7a7d77832;hpb=b6b337ad1c1d6fe11b09b35d75464b84b3e11f07;p=linux-2.6-omap-h63xx.git diff --git a/ipc/namespace.c b/ipc/namespace.c index f7a35be2e77..9171d948751 100644 --- a/ipc/namespace.c +++ b/ipc/namespace.c @@ -26,6 +26,12 @@ static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns) msg_init_ns(ns); shm_init_ns(ns); + /* + * msgmni has already been computed for the new ipc ns. + * Thus, do the ipcns creation notification before registering that + * new ipcns in the chain. + */ + ipcns_notify(IPCNS_CREATED); register_ipcns_notifier(ns); kref_init(&ns->kref); @@ -97,4 +103,10 @@ void free_ipc_ns(struct kref *kref) shm_exit_ns(ns); kfree(ns); atomic_dec(&nr_ipc_ns); + + /* + * Do the ipcns removal notification after decrementing nr_ipc_ns in + * order to have a correct value when recomputing msgmni. + */ + ipcns_notify(IPCNS_REMOVED); }