From: Arnd Bergmann <arnd@arndb•de>
To: f6bvp <f6bvp@free•fr>
Cc: linux-kernel@vger•kernel.org, Jarek Poplawski <jarkao2@gmail•com>,
Linux Netdev List <netdev@vger•kernel.org>,
Ralf Baechle <ralf@linux-mips•org>,
linux-hams@vger•kernel.org
Subject: Re: [AX25] inconsistent lock state
Date: Fri, 17 Jun 2011 15:36:15 +0200 [thread overview]
Message-ID: <201106171536.15660.arnd@arndb.de> (raw)
In-Reply-To: <4DFA662D.5030302@free.fr>
On Thursday 16 June 2011 22:23:09 f6bvp wrote:
> Jun 16 12:03:34 f6bvp-9 kernel: =================================
> Jun 16 12:03:34 f6bvp-9 kernel: [ INFO: inconsistent lock state ]
> Jun 16 12:03:34 f6bvp-9 kernel: 2.6.39.1 #3
> Jun 16 12:03:34 f6bvp-9 kernel: ---------------------------------
> Jun 16 12:03:34 f6bvp-9 kernel: inconsistent {IN-SOFTIRQ-R} -> {SOFTIRQ-ON-W} usage.
> Jun 16 12:03:34 f6bvp-9 kernel: ax25ipd/2813 [HC0[0]:SC0[0]:HE1:SE1] takes:
> Jun 16 12:03:34 f6bvp-9 kernel: (disc_data_lock){+++?.-}, at: [<ffffffffa018552b>] mkiss_close+0x1b/0x90 [mkiss]
> Jun 16 12:03:34 f6bvp-9 kernel: {IN-SOFTIRQ-R} state was registered at:
> ...
> Is there something wrong in AX25 code or (more unlikely) is this
> operation not permitted ?
The message hints that disc_data_lock is aquired with softirqs disabled,
but does not itself disable softirqs, which can in rare circumstances
lead to a deadlock.
Does this fix it?
Signed-off-by: Arnd Bergmann <arnd@arndb•de>
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -708,11 +708,11 @@ static struct mkiss *mkiss_get(struct tty_struct *tty)
{
struct mkiss *ax;
- read_lock(&disc_data_lock);
+ read_lock_bh(&disc_data_lock);
ax = tty->disc_data;
if (ax)
atomic_inc(&ax->refcnt);
- read_unlock(&disc_data_lock);
+ read_unlock_bh(&disc_data_lock);
return ax;
}
@@ -813,10 +813,10 @@ static void mkiss_close(struct tty_struct *tty)
{
struct mkiss *ax;
- write_lock(&disc_data_lock);
+ write_lock_bh(&disc_data_lock);
ax = tty->disc_data;
tty->disc_data = NULL;
- write_unlock(&disc_data_lock);
+ write_unlock_bh(&disc_data_lock);
if (!ax)
return;
next prev parent reply other threads:[~2011-06-17 13:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-19 13:38 kernel BUG at kernel/timer.c:951! Bernard Pidoux
2009-12-19 17:40 ` Jarek Poplawski
2009-12-20 18:04 ` Bernard Pidoux
2010-01-15 14:46 ` Bernard Pidoux
2010-01-15 20:36 ` [PATCH net-2.6] ax25: netrom: rose: Fix timer oopses Jarek Poplawski
2010-01-16 9:04 ` David Miller
2010-02-11 16:34 ` [PATCH 07/13] net: ax25: use seq_hlist_foo() helpers Bernard Pidoux
2011-06-16 20:23 ` [AX25] inconsistent lock state f6bvp
2011-06-17 13:28 ` Ralf Baechle
2011-06-17 13:36 ` Arnd Bergmann [this message]
2011-06-17 13:51 ` Ralf Baechle
2011-06-17 14:11 ` Arnd Bergmann
2011-06-17 15:31 ` f6bvp
2011-06-25 15:51 ` f6bvp
2011-06-25 16:39 ` Ralf Baechle DL5RB
2011-07-01 13:00 ` Bernard F6BVP
2011-07-01 21:28 ` [PATCH] 6pack,mkiss: fix lock inconsistency Arnd Bergmann
2011-07-02 0:30 ` David Miller
2012-10-21 15:18 ` [NetRom] possible circular locking dependency detected Bernard f6bvp
2011-06-17 15:26 ` [AX25] inconsistent lock state f6bvp
2011-06-16 20:29 ` khubd [ INFO: possible circular locking dependency detected ] f6bvp
2011-06-16 20:40 ` [AX25] inconsistent lock state f6bvp
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=201106171536.15660.arnd@arndb.de \
--to=arnd@arndb$(echo .)de \
--cc=f6bvp@free$(echo .)fr \
--cc=jarkao2@gmail$(echo .)com \
--cc=linux-hams@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=ralf@linux-mips$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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