[patch -mm 05/17] ipc namespace : externalizes unshare_ipcs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 05, 2006 at 11:27:57AM +0100, clg at fr.ibm.com wrote:
> From: Cedric Le Goater <clg at fr.ibm.com>
> 
> This patch externalizes unshare_ipcs when CONFIG_IPC_NS is not
> set. This is needed by the unshare_ns syscall. Unfortunately, it could
> not be handled with a dummy static inline in ipc.h because of
> header dependencies on sched.h.

hmm, maybe sched.h should be further broken down ...

best,
Herbert

> Signed-off-by: Cedric Le Goater <clg at fr.ibm.com>
> 
> ---
>  include/linux/ipc.h |    2 +-
>  kernel/fork.c       |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: 2.6.19-rc6-mm2/include/linux/ipc.h
> ===================================================================
> --- 2.6.19-rc6-mm2.orig/include/linux/ipc.h
> +++ 2.6.19-rc6-mm2/include/linux/ipc.h
> @@ -99,7 +99,6 @@ extern struct ipc_namespace init_ipc_ns;
>  #ifdef CONFIG_IPC_NS
>  extern void free_ipc_ns(struct kref *kref);
>  extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
> -extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
>  #else
>  static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
>  {
> @@ -107,6 +106,7 @@ static inline int copy_ipcs(unsigned lon
>  }
>  #endif
>  
> +extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
>  static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
>  {
>  #ifdef CONFIG_IPC_NS
> Index: 2.6.19-rc6-mm2/kernel/fork.c
> ===================================================================
> --- 2.6.19-rc6-mm2.orig/kernel/fork.c
> +++ 2.6.19-rc6-mm2/kernel/fork.c
> @@ -1591,7 +1591,7 @@ static int unshare_semundo(unsigned long
>  }
>  
>  #ifndef CONFIG_IPC_NS
> -static inline int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns)
> +extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns)
>  {
>  	if (flags & CLONE_NEWIPC)
>  		return -EINVAL;
> 
> -- 
> _______________________________________________
> Containers mailing list
> Containers at lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/containers


[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux