mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: James Morris <jmorris@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-acpi@intel.com
Subject: Re: 2.6.10-rc1-mm1
Date: Wed, 27 Oct 2004 02:20:31 -0700	[thread overview]
Message-ID: <20041027022031.1567fe98.akpm@osdl.org> (raw)
In-Reply-To: <Xine.LNX.4.44.0410270409370.8390-100000@thoron.boston.redhat.com>

James Morris <jmorris@redhat.com> wrote:
>
> On Tue, 26 Oct 2004, Andrew Morton wrote:
> 
> > My guess would be that you died here:
> > 
> > 	list_add_tail(&driver->node, &acpi_bus_drivers);
> > 
> > in acpi_bus_register_driver().  Which means that some _other_ acpi driver
> > structure on that list is scrogged.  Perhaps it was marked __init or
> > something.
> > 
> > Can you debug it a bit?  Maybe print the addresses and names of the drivers
> > as they get registered in acpi_bus_register_driver() and also print out
> > acpi_bus_drivers.prev.  If we can get the name of the offending driver
> > we'll be able to find the bug.
> 
> Interestingly, the debug printks are not showing up in
> acpi_bus_register_driver() before the oops, and they should be if that's
> where it's happening.  Compiling with debug info makes the oops go away.
> 
> Here's some debugging of the last few drivers to be registered before the 
> oops is seen:
> 
> name=hpet node=c03ee9a0 acpi_bus_drivers.prev=c03ea6a0
> name=i8042 node=c03eeda0 acpi_bus_drivers.prev=c03ee9a0
> name=floppy node=c03f24c0 acpi_bus_drivers.prev=c03ee9a0
> 
> 
> Note acpi_bus_drivers.prev for floppy was not set to c03eeda0, which you 
> would normally expect?

Not too sure what I'm looking at there.

ah.  the acpi floppy scanning code seems to be misinterpreting the
acpi_bus_register_driver() return value, so if it returns zero we think
that the driver was registered, only it wasn't.  floppy_init() then
proceeds to unregister a not-registered driver.  I think.  Does this help?

--- 25/drivers/block/floppy.c~add-acpi-based-floppy-controller-enumeration-fix-fix	2004-10-27 02:14:33.567295256 -0700
+++ 25-akpm/drivers/block/floppy.c	2004-10-27 02:15:13.415237448 -0700
@@ -4379,7 +4379,7 @@ static int acpi_floppy_init(void)
 		return -ENODEV;
 	}
 	err = acpi_bus_register_driver(&acpi_floppy_driver);
-	if (err >= 0)
+	if (err > 0)
 		acpi_floppy_registered = 1;
 	return err;
 }
@@ -4401,7 +4401,7 @@ int __init floppy_init(void)
 	int i, unit, drive;
 	int err, dr;
 
-	if (acpi_floppy_init() == 0) {
+	if (acpi_floppy_init() <= 0) {
 		err = -ENODEV;
 		goto out_put_acpi;
 	}
_

If so, I wonder why acpi_bus_register_driver() is returning zero.

Bjorn, do I remember hearing that we can drop all that code anyway?  That
it'll be done in another way?


  reply	other threads:[~2004-10-27  9:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-27  4:31 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  5:42 ` 2.6.10-rc1-mm1 Dmitry Torokhov
2004-10-27  5:51   ` 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  6:31     ` 2.6.10-rc1-mm1 Dmitry Torokhov
2004-10-27  6:07   ` 2.6.10-rc1-mm1 Dmitry Torokhov
2004-10-27  6:07 ` 2.6.10-rc1-mm1 James Morris
2004-10-27  6:33   ` 2.6.10-rc1-mm1 Andrew Morton
2004-10-27  8:14     ` 2.6.10-rc1-mm1 James Morris
2004-10-27  9:20       ` Andrew Morton [this message]
2004-10-27 14:52         ` 2.6.10-rc1-mm1 James Morris
2004-10-27 11:11 ` 2.6.10-rc1-mm1: reiser4 delete_from_page_cache compile error Adrian Bunk
2004-10-27 12:13   ` Hugh Dickins
2004-10-27 11:19 ` 2.6.10-rc1-mm1: ipc/mqueue.c: remove unused label Adrian Bunk
2004-10-27 11:32 ` 2.6.10-rc1-mm1 Mathieu Segaud
2004-10-27 14:18   ` 2.6.10-rc1-mm1 Adrian Bunk
2004-10-27 16:42 ` 2.6.10-rc1-mm1 (compile stats) John Cherry
2004-10-27 20:34   ` Andrew Morton
2004-10-28  0:12     ` John Cherry

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=20041027022031.1567fe98.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=jmorris@redhat.com \
    --cc=linux-acpi@intel.com \
    --cc=linux-kernel@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

Powered by JetHome