]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/sys.c
[MIPS] jmr3927: use generic txx9 gpio
[linux-2.6-omap-h63xx.git] / kernel / sys.c
index c326d6dceee337e41e70d441ac07ff3dabe275c6..6a0cc71ee88d61e1afdd47e960a841515dad8a3c 100644 (file)
 #ifndef SET_ENDIAN
 # define SET_ENDIAN(a,b)       (-EINVAL)
 #endif
+#ifndef GET_TSC_CTL
+# define GET_TSC_CTL(a)                (-EINVAL)
+#endif
+#ifndef SET_TSC_CTL
+# define SET_TSC_CTL(a)                (-EINVAL)
+#endif
 
 /*
  * this is where the system-wide overflow UID and GID are defined, for
@@ -991,17 +997,14 @@ asmlinkage long sys_getpgid(pid_t pid)
        else {
                int retval;
                struct task_struct *p;
-               struct pid_namespace *ns;
-
-               ns = current->nsproxy->pid_ns;
 
                read_lock(&tasklist_lock);
-               p = find_task_by_pid_ns(pid, ns);
+               p = find_task_by_vpid(pid);
                retval = -ESRCH;
                if (p) {
                        retval = security_task_getpgid(p);
                        if (!retval)
-                               retval = task_pgrp_nr_ns(p, ns);
+                               retval = task_pgrp_vnr(p);
                }
                read_unlock(&tasklist_lock);
                return retval;
@@ -1025,19 +1028,16 @@ asmlinkage long sys_getsid(pid_t pid)
        else {
                int retval;
                struct task_struct *p;
-               struct pid_namespace *ns;
 
-               ns = current->nsproxy->pid_ns;
-
-               read_lock(&tasklist_lock);
-               p = find_task_by_pid_ns(pid, ns);
+               rcu_read_lock();
+               p = find_task_by_vpid(pid);
                retval = -ESRCH;
                if (p) {
                        retval = security_task_getsid(p);
                        if (!retval)
-                               retval = task_session_nr_ns(p, ns);
+                               retval = task_session_vnr(p);
                }
-               read_unlock(&tasklist_lock);
+               rcu_read_unlock();
                return retval;
        }
 }
@@ -1054,14 +1054,10 @@ asmlinkage long sys_setsid(void)
        if (group_leader->signal->leader)
                goto out;
 
-       /* Fail if a process group id already exists that equals the proposed
-        * session id.
-        *
-        * Don't check if session == 1 because kernel threads and CLONE_NEWPID
-        * tasks use this session id and so the check will always fail and make
-        * it so init cannot successfully call setsid.
+       /* Fail if a process group id already exists that equals the
+        * proposed session id.
         */
-       if (session != 1 && pid_task(sid, PIDTYPE_PGID))
+       if (pid_task(sid, PIDTYPE_PGID))
                goto out;
 
        group_leader->signal->leader = 1;
@@ -1747,7 +1743,12 @@ asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3,
 #else
                        return -EINVAL;
 #endif
-
+               case PR_GET_TSC:
+                       error = GET_TSC_CTL(arg2);
+                       break;
+               case PR_SET_TSC:
+                       error = SET_TSC_CTL(arg2);
+                       break;
                default:
                        error = -EINVAL;
                        break;