Skip to content
Snippets Groups Projects
Select Git revision
  • c17add56ca4ee618b07ed9a21e2a29f0a90dc0ba
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

kernel-doc

Blame
  • util.c 19.68 KiB
    /*
     * linux/ipc/util.c
     * Copyright (C) 1992 Krishna Balasubramanian
     *
     * Sep 1997 - Call suser() last after "normal" permission checks so we
     *            get BSD style process accounting right.
     *            Occurs in several places in the IPC code.
     *            Chris Evans, <chris@ferret.lmh.ox.ac.uk>
     * Nov 1999 - ipc helper functions, unified SMP locking
     *	      Manfred Spraul <manfred@colorfullife.com>
     * Oct 2002 - One lock per IPC id. RCU ipc_free for lock-free grow_ary().
     *            Mingming Cao <cmm@us.ibm.com>
     * Mar 2006 - support for audit of ipc object properties
     *            Dustin Kirkland <dustin.kirkland@us.ibm.com>
     * Jun 2006 - namespaces ssupport
     *            OpenVZ, SWsoft Inc.
     *            Pavel Emelianov <xemul@openvz.org>
     */
    
    #include <linux/mm.h>
    #include <linux/shm.h>
    #include <linux/init.h>
    #include <linux/msg.h>
    #include <linux/smp_lock.h>
    #include <linux/vmalloc.h>
    #include <linux/slab.h>
    #include <linux/capability.h>
    #include <linux/highuid.h>
    #include <linux/security.h>
    #include <linux/rcupdate.h>
    #include <linux/workqueue.h>
    #include <linux/seq_file.h>
    #include <linux/proc_fs.h>
    #include <linux/audit.h>
    #include <linux/nsproxy.h>
    
    #include <asm/unistd.h>
    
    #include "util.h"
    
    struct ipc_proc_iface {
    	const char *path;
    	const char *header;
    	int ids;
    	int (*show)(struct seq_file *, void *);
    };
    
    struct ipc_namespace init_ipc_ns = {
    	.kref = {
    		.refcount	= ATOMIC_INIT(2),
    	},
    };
    
    #ifdef CONFIG_IPC_NS
    static struct ipc_namespace *clone_ipc_ns(struct ipc_namespace *old_ns)
    {
    	int err;
    	struct ipc_namespace *ns;
    
    	err = -ENOMEM;
    	ns = kmalloc(sizeof(struct ipc_namespace), GFP_KERNEL);
    	if (ns == NULL)
    		goto err_mem;
    
    	err = sem_init_ns(ns);
    	if (err)
    		goto err_sem;
    	err = msg_init_ns(ns);
    	if (err)
    		goto err_msg;