From: Jarek Poplawski <jarkao2@gmail.com>
To: Jann Traschewski <jann@gmx.de>
Cc: netdev@vger.kernel.org
Subject: Re: [BUG][AX25] 2.6.28.5 "inconsistent lock state" (2 CPUs / SMP enabled)
Date: Mon, 4 May 2009 07:31:53 +0000 [thread overview]
Message-ID: <20090504073153.GA5354@ff.dom.local> (raw)
In-Reply-To: <4152EA8442834D52AA9C100377B9ABE2@A050313B>
On 03-05-2009 10:06, Jann Traschewski wrote:
> Hi,
>
> the AX.25 code has still some problems with SMP and locking. I turned on
> lock debugging on my machine with a lot of AX.25 traffic. Although it did
> take serveral days until I got this:
>
> =================================
> [ INFO: inconsistent lock state ]
> 2.6.28.5-dg8ngn #1
> ---------------------------------
> inconsistent {softirq-on-R} -> {in-softirq-W} usage.
> swapper/0 [HC0[0]:SC1[2]:HE1:SE0] takes:
> (clock-AF_AX25){-+-?}, at: [<f859ed33>] ax25_destroy_socket+0xb6/0x1c4
> [ax25]
> {softirq-on-R} state was registered at:
> [<c013a751>] __lock_acquire+0x4e4/0x65e
> [<c0124d14>] local_bh_enable+0xa5/0xa9
> [<c013a914>] lock_acquire+0x49/0x61
> [<c025a221>] sock_def_wakeup+0x11/0x3d
> [<c02ca449>] _read_lock+0x19/0x24
> [<c025a221>] sock_def_wakeup+0x11/0x3d
> [<c025a221>] sock_def_wakeup+0x11/0x3d
> [<f859fb9c>] ax25_release+0x17e/0x1ab [ax25]
> [<c025847f>] sock_release+0x11/0x59
> [<c0258883>] sock_close+0x19/0x1c
...
Hi,
Could you try this patch?
Thanks,
Jarek P.
---
net/ax25/af_ax25.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index fd9d06f..f2fec78 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -314,8 +314,21 @@ void ax25_destroy_socket(ax25_cb *ax25)
/* A pending connection */
ax25_cb *sax25 = ax25_sk(skb->sk);
- /* Queue the unaccepted socket for death */
- sock_orphan(skb->sk);
+ /*
+ * Queue the unaccepted socket for death.
+ * Btw., it was never grafted, so sock_orphan()
+ * is unnecessary.
+ */
+ if (unlikely(skb->sk->sk_socket)) {
+ /*
+ * This is old code, so let's leave it
+ * for some time for debugging.
+ */
+ sock_orphan(skb->sk);
+ WARN_ON_ONCE(1);
+ } else {
+ sock_set_flag(skb->sk, SOCK_DEAD);
+ }
/* 9A4GL: hack to release unaccepted sockets */
skb->sk->sk_state = TCP_LISTEN;
next prev parent reply other threads:[~2009-05-04 7:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-03 8:06 [BUG][AX25] 2.6.28.5 "inconsistent lock state" (2 CPUs / SMP enabled) Jann Traschewski
2009-05-04 7:31 ` Jarek Poplawski [this message]
2009-05-04 11:45 ` [BUG][AX25] 2.6.28.5 "inconsistent lock state" (2 CPUs / SMPenabled) Jann Traschewski
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=20090504073153.GA5354@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=jann@gmx.de \
--cc=netdev@vger.kernel.org \
/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