LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Frederik Deweerdt <deweerdt@free.fr>
To: Jose Goncalves <jose.goncalves@inov.pt>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: Serial related oops
Date: Wed, 21 Feb 2007 22:53:08 +0000 [thread overview]
Message-ID: <20070221225308.GA4113@slug> (raw)
In-Reply-To: <45DC537B.6020108@inov.pt>
On Wed, Feb 21, 2007 at 02:13:15PM +0000, Jose Goncalves wrote:
> New devolpments.
> I have upgraded to 2.6.16.41, applied a patch sent by Frederik that
> removed the changed made in http://lkml.org/lkml/2005/6/23/266 and
> activated some more kernel debug, i.e., CONFIG_KALLSYMS_ALL,
> CONFIG_DEBUG_KERNEL, CONFIG_DETECT_SOFTLOCKUP, CONFIG_DEBUG_SLAB,
> CONFIG_DEBUG_MUTEXES, CONFIG_FRAME_POINTER and CONFIG_FORCED_INLINING
> (thanks to vda for pointing me to the right doc.).
> At first it seemed to work fine, but after some days of continuous
> running I've got another kernel Oops!
> I attach the dmesg output and the assembly dump of serial8250_startup()
> and serial8250_shutdown().
>
As suspected by Russell, the badness seems to happen just at the
end of the serial_inp on LSR, drivers/serial/8250.c:1650.
The NULL deref happens at the beginning of the serial_inp(up, UART_RX)
call, when trying to dereference *up.
c01bfa70 <serial_in>:
c01bfa70: 55 push %ebp
c01bfa71: 89 e5 mov %esp,%ebp
c01bfa73: 53 push %ebx
c01bfa74: 8b 5d 08 mov 0x8(%ebp),%ebx << %ebx = up (which is NULL)
c01bfa77: 8b 55 0c mov 0xc(%ebp),%edx
c01bfa7a: 0f b6 4b 12 movzbl 0x12(%ebx),%ecx << %ecx = *(%ebx+12) Oops
c01bfa7e: 0f b6 43 13 movzbl 0x13(%ebx),%eax
It seems that somehow, the pop %ebx at the end of
the serial_inp(up, UART_LSR) function poped a NULL value instead of the
expected pointer. Any suggestion on how this could happen?
Jose, did you try to msleep(10) before the "And clear the interrupt
registers again for luck." as suggested by Russell?
You should also revert the change I suggested, it seems I missed the
target by a few lines of code :).
Regards,
Frederik
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 7aca22c..385cc51 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1643,6 +1643,7 @@ static int serial8250_startup(struct uart_port *port)
(void) inb_p(icp);
}
+ msleep(10);
/*
* And clear the interrupt registers again for luck.
*/
next prev parent reply other threads:[~2007-02-21 22:54 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 13:29 Frederik Deweerdt
2007-02-19 13:45 ` Russell King
2007-02-20 14:24 ` Frederik Deweerdt
2007-02-19 14:35 ` Russell King
2007-02-20 14:48 ` Frederik Deweerdt
2007-02-19 15:05 ` Russell King
2007-02-19 16:29 ` Jose Goncalves
2007-02-19 16:42 ` Russell King
2007-02-19 17:54 ` Jose Goncalves
2007-02-19 20:37 ` Michael K. Edwards
2007-02-19 20:51 ` Russell King
2007-02-19 21:24 ` Michael K. Edwards
2007-02-19 21:31 ` Russell King
2007-02-19 22:16 ` Michael K. Edwards
2007-02-19 23:20 ` Russell King
2007-02-20 0:04 ` Michael K. Edwards
2007-02-20 0:21 ` Russell King
2007-02-20 2:17 ` Michael K. Edwards
2007-02-24 2:46 ` Michael K. Edwards
2007-02-19 21:23 ` Russell King
2007-02-21 14:13 ` Jose Goncalves
2007-02-21 14:55 ` Jose Goncalves
2007-02-21 22:53 ` Frederik Deweerdt [this message]
2007-02-21 23:05 ` Russell King
2007-02-22 0:34 ` Michael K. Edwards
2007-02-22 8:54 ` Russell King
2007-02-22 15:07 ` Jose Goncalves
2007-02-22 16:56 ` Russell King
2007-02-22 17:24 ` jose.goncalves
2007-02-22 5:57 ` H. Peter Anvin
2007-02-22 7:39 ` Frederik Deweerdt
2007-02-22 8:52 ` Russell King
2007-02-22 15:02 ` Jose Goncalves
2007-02-22 17:03 ` Russell King
2007-02-22 17:21 ` jose.goncalves
2007-02-22 17:32 ` Paul Fulghum
2007-03-01 13:33 ` Jose Goncalves
2007-03-01 15:10 ` Russell King
2007-03-01 15:24 ` Jose Goncalves
[not found] <fa.0IigYYV566ZB0kBHCj88jOEJx1s@ifi.uio.no>
[not found] ` <fa.IE91N03KQO01UZbOdcF6HewOdYc@ifi.uio.no>
2007-02-20 2:48 ` Robert Hancock
2007-02-20 4:59 ` Michael K. Edwards
2007-02-20 5:18 ` Robert Hancock
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=20070221225308.GA4113@slug \
--to=deweerdt@free.fr \
--cc=akpm@linux-foundation.org \
--cc=jose.goncalves@inov.pt \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: Serial related oops' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).