lkml.org 
[lkml]   [2004]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Linux 2.6.3-rc1
Date
On Monday 09 of February 2004 01:08, Andre Tomt wrote:
> Bartlomiej Zolnierkiewicz wrote:
> >>>Can you disassemble ide_pci_register_host_proc using gdb?
> >>
> >>I'd need a walkthrough, not very familiar with gdb other than getting a
> >>backtrace out of it
> >
> > Make sure to enable following options in kernel config:
> > CONFIG_DEBUG_KERNEL ("Kernel hacking"->"Kernel debugging" ) and
> > CONFIG_DEBUG_INFO ("Kernel debugging"->"Compile the kernel with debug
> > info").
> >
> > Recompile kernel.
> >
> > $ gdb /usr/src/linux/vmlinux
> > (gdb) disassemble ide_pci_register_host_proc
> >
> > That's all :-).
>
> Ahh. However, as ide-core is a module in this case, I had to run gdb on
> the module instead. Anyway..

Yep.

> (gdb) disassemble ide_pci_register_host_proc
> Dump of assembler code for function ide_pci_register_host_proc:
> 0xe940 <ide_pci_register_host_proc>: mov 0x4(%esp,1),%ecx
> 0xe944 <ide_pci_register_host_proc+4>: test %ecx,%ecx
> 0xe946 <ide_pci_register_host_proc+6>: je 0xe978
> <ide_pci_register_host_proc+56>
> 0xe948 <ide_pci_register_host_proc+8>: movl $0x0,0x10(%ecx)
> 0xe94f <ide_pci_register_host_proc+15>: movb $0x1,0x4(%ecx)
> 0xe953 <ide_pci_register_host_proc+19>: mov 0x3910,%eax
> 0xe958 <ide_pci_register_host_proc+24>: test %eax,%eax
> 0xe95a <ide_pci_register_host_proc+26>: je 0xe972
> <ide_pci_register_host_proc+50>
> 0xe95c <ide_pci_register_host_proc+28>: mov %eax,%edx
> 0xe95e <ide_pci_register_host_proc+30>: mov 0x10(%eax),%eax
> 0xe961 <ide_pci_register_host_proc+33>: test %eax,%eax
> 0xe963 <ide_pci_register_host_proc+35>: je 0xe96e
> <ide_pci_register_host_proc+46>
> 0xe965 <ide_pci_register_host_proc+37>: mov %eax,%edx

Access to ide_pci_proc_host_list->next.

> 0xe967 <ide_pci_register_host_proc+39>: mov 0x10(%eax),%eax
> 0xe96a <ide_pci_register_host_proc+42>: test %eax,%eax
> 0xe96c <ide_pci_register_host_proc+44>: jne 0xe965
> <ide_pci_register_host_proc+37>
> 0xe96e <ide_pci_register_host_proc+46>: mov %ecx,0x10(%edx)
> 0xe971 <ide_pci_register_host_proc+49>: ret
> 0xe972 <ide_pci_register_host_proc+50>: mov %ecx,0x3910
> 0xe978 <ide_pci_register_host_proc+56>: ret
> End of assembler dump.

Ok thanks, I got the same dump. I think the problem is that memory used by
previously registered ide_pci_host_proc_list entry (for pdc202xx_new driver)
is already unmapped because of __initdata in pdc202xx_new.h.
(This doesn't happen in built-in case because this memory is freed after
all drivers are initialized.)

Does this patch help?

linux-2.6.3-rc1-bk1-root/drivers/ide/pci/pdc202xx_new.h | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/ide/pci/pdc202xx_new.h~pdc202xx_old_oops drivers/ide/pci/pdc202xx_new.h
--- linux-2.6.3-rc1-bk1/drivers/ide/pci/pdc202xx_new.h~pdc202xx_old_oops 2004-02-09 02:20:24.816898368 +0100
+++ linux-2.6.3-rc1-bk1-root/drivers/ide/pci/pdc202xx_new.h 2004-02-09 02:20:57.167980256 +0100
@@ -172,7 +172,7 @@ static u8 pdcnew_proc;

static int pdcnew_get_info(char *, char **, off_t, int);

-static ide_pci_host_proc_t pdcnew_procs[] __initdata = {
+static ide_pci_host_proc_t pdcnew_procs[] = {
{
.name = "pdcnew",
.set = 1,
_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.584 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site