From: David Miller <davem@davemloft.net>
To: adobriyan@gmail.com
Cc: simon@fire.lp0.eu, linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: xfrm_policy_kill: inconsistent {softirq-on-W} -> {in-softirq-W} usage
Date: Mon, 03 Nov 2008 19:12:10 -0800 (PST) [thread overview]
Message-ID: <20081103.191210.149092227.davem@davemloft.net> (raw)
In-Reply-To: <20081103205726.GA3589@x200.localdomain>
From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Mon, 3 Nov 2008 23:57:26 +0300
> If it's easily reproducible, try this patch:
>
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -315,9 +315,9 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
This looks clearly like the correct fix for this lockdep
warning, so I'm adding it to net-2.6 as follows even though
Simon can't readily test it.
Thanks.
commit bbb770e7ab9a436752babfc8765e422d7481be1f
Author: Alexey Dobriyan <adobriyan@gmail.com>
Date: Mon Nov 3 19:11:29 2008 -0800
xfrm: Fix xfrm_policy_gc_lock handling.
From: Alexey Dobriyan <adobriyan@gmail.com>
Based upon a lockdep trace by Simon Arlott.
xfrm_policy_kill() can be called from both BH and
non-BH contexts, so we have to grab xfrm_policy_gc_lock
with BH disabling.
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 2587274..058f04f 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -315,9 +315,9 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
return;
}
- spin_lock(&xfrm_policy_gc_lock);
+ spin_lock_bh(&xfrm_policy_gc_lock);
hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
- spin_unlock(&xfrm_policy_gc_lock);
+ spin_unlock_bh(&xfrm_policy_gc_lock);
schedule_work(&xfrm_policy_gc_work);
}
prev parent reply other threads:[~2008-11-04 3:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-03 17:59 Simon Arlott
2008-11-03 20:57 ` Alexey Dobriyan
2008-11-03 21:20 ` Simon Arlott
2008-11-04 3:12 ` David Miller [this message]
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=20081103.191210.149092227.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=simon@fire.lp0.eu \
/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®