Skip to contentSkip to conversation

Badness in pci_find_subsys

DISCUSSION vishwas manral 4 participants 5 messages Feb 23, 2004

lore
Share & tools
lore
#0 lore raw

Hi Robin/Prakash,

I was checking the pci documentation and it said under the heading Obsolete function

pci_find_subsys() - Superseded by pci_get_subsys() as the former is not Hot plug safe.

Could this be related to the problem?

Thanks,
Vishwas

--------- Original Message ---------

DATE: Sun, 22 Feb 2004 18:52:11
From: "Prakash K. Cheemplavam" <[email protected]>
To: Robin Rosenberg <[email protected]>
Cc: Linux kernel <[email protected]>

Quoted 8 lines
Quoted 7 lines · Robin Rosenberg

There is a regular error (2.6.1,2.6.2) that locks up my X although I don't know if it has anything to do with X per se other than that after every lockup i find an error in syslog.

Feb 22 18:23:25 h6n2fls33o811 kernel: Badness in pci_find_subsys at drivers/pci/search.c:167
Feb 22 18:23:25 h6n2fls33o811 kernel: Call Trace:
Feb 22 18:23:25 h6n2fls33o811 kernel:  [pci_find_subsys+215/224] pci_find_subsys+0xd7/0xe0
Quoted 6 lines

[snip]

It is Nvidia binary driver doing some crap.

Prakash

____________________________________________________________
Find what you are looking for with the Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10

#1 lore raw
Quoted 5 lines · vishwas manral

Hi Robin/Prakash,

I was checking the pci documentation and it said under the heading Obsolete function pci_find_subsys() - Superseded by pci_get_subsys() as the former is not Hot plug safe. Could this be related to the problem

You WHAT? Read the documentation! :-) I thought the ones calling the function should do that.

I dunno, I'm not hotplugging anything and it crashes anyway, The functionality is there since I want to hotplug a camera sometimes. but I'm not always "doing it" during uptimes that have the crash. Anyway I assume the crux here is PCI hotplug that my machine does not do; you need special support on the motherboard for that, right?

I found some options to try out, but no conclusive info, at the nvidia linux discussion forum.

-- robin

#2 lore raw
Quoted 6 lines · Robin Rosenberg
Quoted 3 lines

I was checking the pci documentation and it said under the heading Obsolete function pci_find_subsys() - Superseded by pci_get_subsys() as the former is not Hot plug safe. Could this be related to the problem

You WHAT? Read the documentation! :-) I thought the ones calling the function should do that.

Reading the documentation (ie. source code) it appears the problem is triggered by the line

WARN_ON(in_interrupt());

Looks like the driver calls pci_find_subsys() from inside an interrupt on occasions which apparently it shouldn't. The problem seems to be on nvidia's side, not kernel development. I have emailed nvidia about it some time ago, so far no reaction...

I got the problem with nvidia modules 4496, 5328, 5336 and with kernels 2.6.0, 2.6.1, 2.6.2, never with 2.4.X. I have stopped using the nvidia kernel module for now.

Quoted 2 lines

I found some options to try out, but no conclusive info, at the nvidia linux discussion forum.

Is this www.nvnews.net you are talking about? I can't find any proper contacts on the nvidia web site. I'll go over and add a comment right now. ;-)

cu Martin

#3 lore raw
Quoted 9 lines · Martin

Reading the documentation (ie. source code) it appears the problem is triggered by the line

WARN_ON(in_interrupt());

Looks like the driver calls pci_find_subsys() from inside an interrupt on occasions which apparently it shouldn't. The problem seems to be on nvidia's side, not kernel development. I have emailed nvidia about it some time ago, so far no reaction...

Tracing the stack, I see:

pci_find_subsys is deprecated which is called from pci_find_device which is deprecated which is called from pci_find_slot, which is NOT deprecated.

-- robin

#4 lore raw
In reply to Martin
Quoted 12 lines · Martin
Quoted 6 lines · Robin Rosenberg
Quoted 3 lines

I was checking the pci documentation and it said under the heading Obsolete function pci_find_subsys() - Superseded by pci_get_subsys() as the former is not Hot plug safe. Could this be related to the problem

You WHAT? Read the documentation! :-) I thought the ones calling the function should do that.

Reading the documentation (ie. source code) it appears the problem is triggered by the line

Quoted 6 lines

WARN_ON(in_interrupt());

Looks like the driver calls pci_find_subsys() from inside an interrupt on occasions which apparently it shouldn't. The problem seems to be on nvidia's side, not kernel development. I have emailed nvidia about it some time ago, so far no reaction...

This is correct, that function should not be called from within an interrupt. That is just stupid programming...

thanks,

greg k-h