Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754943Ab3CEXLo (ORCPT ); Tue, 5 Mar 2013 18:11:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28962 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752523Ab3CEXLm (ORCPT ); Tue, 5 Mar 2013 18:11:42 -0500 Message-ID: <51367B88.7000908@redhat.com> Date: Tue, 05 Mar 2013 18:11:04 -0500 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Davidlohr Bueso CC: Linus Torvalds , Emmanuel Benisty , "Vinod, Chegu" , "Low, Jason" , Peter Zijlstra , "H. Peter Anvin" , Andrew Morton , aquini@redhat.com, Michel Lespinasse , Ingo Molnar , Larry Woodman , Linux Kernel Mailing List , Steven Rostedt , Thomas Gleixner Subject: Re: [PATCH v2 4/4] ipc: sem: do not hold ipc lock more than necessary References: <1362476179.2225.54.camel@buesod1.americas.hpqcorp.net> In-Reply-To: <1362476179.2225.54.camel@buesod1.americas.hpqcorp.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 908 Lines: 35 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/