On 03/05/2013 04:36 AM, Davidlohr Bueso wrote:

@@ -888,27 +924,34 @@ static int semctl_main(struct ipc_namespace *ns, int 
semid, int semnum,
  {
        struct sem_array *sma;
        struct sem* curr;
-       int err;
+       int err, nsems;
        ushort fast_sem_io[SEMMSL_FAST];
        ushort* sem_io = fast_sem_io;
-       int nsems;
        struct list_head tasks;

-       sma = sem_lock_check(ns, semid);
-       if (IS_ERR(sma))
+       INIT_LIST_HEAD(&tasks);
+
+       rcu_read_lock();
+       sma = sem_obtain_object_check(ns, semid);
+       if (IS_ERR(sma)) {
+               rcu_read_lock();

I assume this should be an rcu_read_unlock? :)

                return PTR_ERR(sma);
+       }


--
All rights reversed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to