From: Toralf Lund <toralf@procaptura.com>
To: linux-kernel@vger.kernel.org
Subject: Re: insmod segfault in pci_find_subsys()
Date: Tue, 29 Mar 2005 16:15:37 +0200 [thread overview]
Message-ID: <42496309.3080007@procaptura.com> (raw)
In-Reply-To: <20050318170709.GD14952@kroah.com>
Greg KH wrote:
>On Fri, Mar 18, 2005 at 10:12:05AM +0100, Toralf Lund wrote:
>
>
>>Am I seeing an issue with the PCI functions here, or is it just that I
>>fail to spot an obvious mistake in the module itself?
>>
>>
>
>I think it's a problem in your code. I built and ran the following
>example module just fine (based on your example, which wasn't the
>smallest or cleanest...), with no oops. Does this code work for you?
>
>
OK, I've finally been able to test this, and no, it does not work.
insmod segfaults and the system log says
kernel: Unable to handle kernel paging request at virtual address 533e3762
>Oh, and the pci_find* functions are depreciated, do not use them, they
>are going away in the near future. Please use the pci_get* functions
>instead.
>
>thanks,
>
>greg k-h
>
>-----------------
>#include <linux/pci.h>
>#include <linux/module.h>
>
>MODULE_LICENSE("GPL");
>
>
>static void __exit exit(void)
>{
>}
>
>static __init int init(void)
>{
> struct pci_dev *dev;
>
> printk(KERN_DEBUG "Scanning all devices...\n");
>
> dev = NULL;
> while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev))) {
> printk(KERN_DEBUG "Device %04hx:%04hx\n",
> dev->vendor, dev->device);
> }
> return 0;
>}
>
>module_init(init);
>module_exit(exit);
>
>-
>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/
>
>
next prev parent reply other threads:[~2005-03-29 14:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-18 9:12 insmod segfault in pci_find_subsys() Toralf Lund
2005-03-18 17:07 ` Greg KH
2005-03-19 12:28 ` Toralf Lund
2005-03-29 14:15 ` Toralf Lund [this message]
2005-04-13 7:12 ` Greg KH
2005-04-13 11:00 ` Toralf Lund
2005-04-13 11:13 ` Arjan van de Ven
2005-04-13 11:49 ` Toralf Lund
2005-04-13 13:27 ` Sam Ravnborg
2005-04-18 7:20 ` Toralf Lund
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=42496309.3080007@procaptura.com \
--to=toralf@procaptura.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 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.