mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Miles Lane <miles.lane@gmail.com>, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjan@infradead.org>
Subject: Re: [patch] lockdep, annotate slocks: turn lockdep off for them
Date: Fri, 30 Jun 2006 21:17:34 +1000	[thread overview]
Message-ID: <20060630111734.GA22202@gondor.apana.org.au> (raw)
In-Reply-To: <20060630091850.GA10713@elte.hu>

On Fri, Jun 30, 2006 at 11:18:50AM +0200, Ingo Molnar wrote:
> 
> Herbert, do the acquire/release semantics as expressed in the 
> lockdep-annotate-slock.patch match sk_lock semantics?

I think it should be fine.
 
> @@ -250,9 +283,18 @@ int sk_receive_skb(struct sock *sk, stru
>  	skb->dev = NULL;
>  
>  	bh_lock_sock(sk);
> -	if (!sock_owned_by_user(sk))
> +	if (!sock_owned_by_user(sk)) {
> +		/*
> +		 * trylock + unlock semantics:
> +		 */
> +		spin_release(&sk->sk_lock.slock.dep_map, 1, _RET_IP_);
> +		mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);

Although it would seem that keeping the spin lock would fit the actual
semantics better.  I suppose there must be a technical reason why this
wouldn't work.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2006-06-30 11:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 19:01 2.6.17-mm3 -- BUG: illegal lock usage -- illegal {softirq-on-W} -> {in-softirq-R} usage Miles Lane
2006-06-29 19:26 ` Andrew Morton
2006-06-29 19:42   ` Arjan van de Ven
2006-06-29 19:56     ` Andrew Morton
2006-06-30  2:57       ` Herbert Xu
2006-06-30  6:50 ` Ingo Molnar
2006-06-30  6:59   ` Ingo Molnar
2006-06-30  7:22   ` [patch] lockdep, annotate slocks: turn lockdep off for them Ingo Molnar
2006-06-30  9:18     ` Ingo Molnar
2006-06-30 11:17       ` Herbert Xu [this message]
2006-06-30 11:37         ` Ingo Molnar
2006-06-30 11:46           ` Herbert Xu
2006-06-30 20:21           ` Miles Lane
2006-06-30 20:38             ` Ingo Molnar
2006-06-30 22:45               ` Miles Lane
2006-07-01  0:14                 ` Miles Lane
2006-07-01  5:32                 ` Ingo Molnar
2006-07-01  9:41                 ` Arjan van de Ven
2006-07-01 14:06                   ` Miles Lane
2006-07-01 14:07                     ` Herbert Xu
2006-07-01 14:10                       ` Miles Lane
2006-07-01 14:19                         ` Miles Lane

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=20060630111734.GA22202@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miles.lane@gmail.com \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®