From: Peter Hurley <peter@hurleysoftware.com>
To: Tony Lindgren <tony@atomide.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org
Subject: Re: Bunch of serial warnings in next at least with omap-serial
Date: Tue, 3 May 2016 14:01:51 -0700 [thread overview]
Message-ID: <572911BF.8000803@hurleysoftware.com> (raw)
In-Reply-To: <20160503203930.GQ5995@atomide.com>
Hi Tony,
On 05/03/2016 01:39 PM, Tony Lindgren wrote:
> Hi Peter,
>
> Looks like probably commit 4047b37122d1 ("serial: core: Prevent unsafe
> uart port access, part 1") in Linux next causes tons of warnings with at
> least omap-serial. It does not revert cleanly I have not tested with that
> reverted. Any ideas? Dmesg output of the errors below.
Thanks for the report.
Patch below should fix that.
--- >% ---
Subject: [PATCH] serial: core: Fix port mutex assert if lockdep disabled
commit 4047b37122d1 ("serial: core: Prevent unsafe uart port access,
part 1") added lockdep assertion for port mutex but fails to check
if debug_locks has disabled lockdep (so lock state is no longer
reliable).
Use lockdep_assert_held() instead, which properly checks lockdep
state as well.
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/serial_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 0e66923..b88a054 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -95,9 +95,7 @@ static inline void uart_port_deref(struct uart_port *uport)
static inline struct uart_port *uart_port_check(struct uart_state *state)
{
-#ifdef CONFIG_LOCKDEP
- WARN_ON(!lockdep_is_held(&state->port.mutex));
-#endif
+ lockdep_assert_held(&state->port.mutex);
return state->uart_port;
}
--
2.8.2
WARNING: multiple messages have this Message-ID (diff)
From: peter@hurleysoftware.com (Peter Hurley)
To: linux-arm-kernel@lists.infradead.org
Subject: Bunch of serial warnings in next at least with omap-serial
Date: Tue, 3 May 2016 14:01:51 -0700 [thread overview]
Message-ID: <572911BF.8000803@hurleysoftware.com> (raw)
In-Reply-To: <20160503203930.GQ5995@atomide.com>
Hi Tony,
On 05/03/2016 01:39 PM, Tony Lindgren wrote:
> Hi Peter,
>
> Looks like probably commit 4047b37122d1 ("serial: core: Prevent unsafe
> uart port access, part 1") in Linux next causes tons of warnings with at
> least omap-serial. It does not revert cleanly I have not tested with that
> reverted. Any ideas? Dmesg output of the errors below.
Thanks for the report.
Patch below should fix that.
--- >% ---
Subject: [PATCH] serial: core: Fix port mutex assert if lockdep disabled
commit 4047b37122d1 ("serial: core: Prevent unsafe uart port access,
part 1") added lockdep assertion for port mutex but fails to check
if debug_locks has disabled lockdep (so lock state is no longer
reliable).
Use lockdep_assert_held() instead, which properly checks lockdep
state as well.
Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/serial_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 0e66923..b88a054 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -95,9 +95,7 @@ static inline void uart_port_deref(struct uart_port *uport)
static inline struct uart_port *uart_port_check(struct uart_state *state)
{
-#ifdef CONFIG_LOCKDEP
- WARN_ON(!lockdep_is_held(&state->port.mutex));
-#endif
+ lockdep_assert_held(&state->port.mutex);
return state->uart_port;
}
--
2.8.2
next parent reply other threads:[~2016-05-03 21:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160503203930.GQ5995@atomide.com>
2016-05-03 21:01 ` Peter Hurley [this message]
2016-05-03 21:01 ` Bunch of serial warnings in next at least with omap-serial Peter Hurley
2016-05-03 21:58 ` Tony Lindgren
2016-05-03 21:58 ` Tony Lindgren
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=572911BF.8000803@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.