mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Emmanuel Benisty <benisty.e@gmail.com>,
	"Vinod, Chegu" <chegu_vinod@hp.com>,
	"Low, Jason" <jason.low2@hp.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	aquini@redhat.com, Michel Lespinasse <walken@google.com>,
	Ingo Molnar <mingo@kernel.org>,
	Larry Woodman <lwoodman@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2 4/4] ipc: sem: do not hold ipc lock more than necessary
Date: Tue, 05 Mar 2013 18:11:04 -0500	[thread overview]
Message-ID: <51367B88.7000908@redhat.com> (raw)
In-Reply-To: <1362476179.2225.54.camel@buesod1.americas.hpqcorp.net>

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

  reply	other threads:[~2013-03-05 23:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-05  9:36 Davidlohr Bueso
2013-03-05 23:11 ` Rik van Riel [this message]
2013-03-20 14:27 ` Rik van Riel
2013-03-20 15:38   ` Rik van Riel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51367B88.7000908@redhat.com \
    --to=riel@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=benisty.e@gmail.com \
    --cc=chegu_vinod@hp.com \
    --cc=davidlohr.bueso@hp.com \
    --cc=hpa@zytor.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lwoodman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=walken@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome