All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Luben Tuikov <luben_tuikov@adaptec.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Oops calling sysfs_create_link() from pci_probe()
Date: Thu, 16 Jun 2005 22:55:55 -0700	[thread overview]
Message-ID: <20050617055555.GA16371@kroah.com> (raw)
In-Reply-To: <42B1D9AE.5000002@adaptec.com>

On Thu, Jun 16, 2005 at 03:57:34PM -0400, Luben Tuikov wrote:
> Hi,
> 
> I'm calling
> 
> sysfs_create_link(&class->kobj,
> 		  &pcidev->driver->driver.kobj, "driver");
> 
> To create a link from a syfs directory of an object which I've
> created with class_device_regsiter(), to point to the
> driver directory of the pci driver.

Ick, why?  Shouldn't something like this be done in the driver core, and
not in the individual drivers?

> This is effectively called at the bottom of the pci_driver->probe
> function.
> 
> But I get this oops:
>  printing eip:
> c0229e7b
> *pde = 00000000
> Oops: 0000 [#1]
> PREEMPT SMP 
> Modules linked in: aic94xx sas_class
> CPU:    0
> EIP:    0060:[<c0229e7b>]    Not tainted VLI
> EFLAGS: 00010296   (2.6.12-rc6) 
> EIP is at kref_get+0xb/0x50

Looks like one of the kobjects that you are wanting to link is not fully
initialized and registered with sysfs.  Where are you getting that
"&class->kobj" from?

Have a pointer to your patch anywhere?

Also, try turning on kobject and driver core debugging, you should get a
lot of helpful information in your syslog right before this oops.

thanks,

greg k-h

  reply	other threads:[~2005-06-17  5:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-16 19:57 Oops calling sysfs_create_link() from pci_probe() Luben Tuikov
2005-06-17  5:55 ` Greg KH [this message]
2005-06-17 16:23   ` Luben Tuikov

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=20050617055555.GA16371@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luben_tuikov@adaptec.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.