linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@sgi.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Latest bk kernel does not properly free PCI IO & MEM allocations
Date: Thu, 10 Mar 2005 18:50:24 +0000	[thread overview]
Message-ID: <423096F0.4060901@sgi.com> (raw)
In-Reply-To: <422F42A9.7050009@sgi.com>


> Greg KH wrote: Also, if you enable slab debugging, does this always 
> occur?
>  
>

Sorry Greg -- still waiting on linux-pci subscription ... :(

Anyway just to continue the discussion -- here's a run with SLAB debug 
on.  The oops is now 100% reproducible. 

[root@altix3 ~]# lspci
01:01.0 Co-processor: Silicon Graphics, Inc. IOC4 I/O controller (rev 53)
01:03.0 SCSI storage controller: QLogic Corp. ISP12160 Dual Channel 
Ultra3 SCSI Processor (rev 06)
01:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 
Gigabit Ethernet (rev 15)
02:01.0 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
02:01.1 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
03:01.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
03:01.1 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
05:01.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
05:01.1 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
[root@altix3 ~]# cat /proc/iomem
c00000880c200000-c00000880c2fffff : 0000:01:01.0
c00000880f400000-c00000880f41ffff : 0000:03:01.0
c00000880d400000-c00000880d41ffff : 0000:05:01.0
c00001880cc00000-c00001880cc00fff : 0000:02:01.0
c00001880cc01000-c00001880cc01fff : 0000:02:01.1
[root@altix3 ~]# cat /proc/ioports
00000060-0000006f : i8042
130027ad160-130027ad163 : PM1a_EVT_BLK
130027ad170-130027ad171 : PM1a_CNT_BLK
130027ad180-130027ad183 : PM_TMR
130027ad190-130027ad197 : GPE0_BLK
c00000880c200100-c00000880c20011f : ide0
c00000880c200140-c00000880c200163 : ide0
c00000880c600000-c00000880c6000ff : 0000:01:03.0
c00001880ca00000-c00001880ca000ff : 0000:02:01.0
c00000880f200000-c00000880f2000ff : 0000:03:01.0
c00000880d200000-c00000880d2000ff : 0000:05:01.0
[root@altix3 ~]# !modprobe
modprobe sgi_hotplug
[root@altix3 ~]# cd /sys/bus/pci/slots/
[root@altix3 slots]# ls
m_001\x01_b_1_s_2  m_001\x01_b_3_s_1  m_001\x01_b_4_s_2  m_001\x01_b_6_s_1
m_001\x01_b_2_s_1  m_001\x01_b_3_s_2  m_001\x01_b_5_s_1  m_001\x01_b_6_s_2
m_001\x01_b_2_s_2  m_001\x01_b_4_s_1  m_001\x01_b_5_s_2
[root@altix3 slots]# cd m_001\x01_b_5_s_1
[root@altix3 m_001\x01_b_5_s_1]# echo 0 > power
Begin PCI Hot-Plug Message for -> m_001\x01_b_5_s_1
Remove operation successful
End PCI Hot-Plug Message for -> m_001\x01_b_5_s_1

[root@altix3 m_001\x01_b_5_s_1]# lspci
01:01.0 Co-processor: Silicon Graphics, Inc. IOC4 I/O controller (rev 53)
01:03.0 SCSI storage controller: QLogic Corp. ISP12160 Dual Channel 
Ultra3 SCSI Processor (rev 06)
01:04.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 
Gigabit Ethernet (rev 15)
02:01.0 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
02:01.1 Fibre Channel: QLogic Corp. QLA2312 Fibre Channel Adapter (rev 02)
03:01.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
03:01.1 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X 
Fusion-MPT Dual Ultra320 SCSI (rev 07)
[root@altix3 m_001\x01_b_5_s_1]# cat /proc/iomem
Segmentation fault
Unable to handle kernel paging request at virtual address 6b6b6b6b6b6b6b8b
cat[2871]: Oops 11012296146944 [1]
Modules linked in: sgi_hotplug(U) md5(U) ipv6(U) parport_pc(U) lp(U) 
parport(U) autofs4(U) sunrpc(U) ds(U) yenta_socket(U) pcmcia_core(U) 
ipt_REJECT(U) ipt_state(U) ip_conntrack(U) iptable_filter(U) 
ip_tables(U) vfat(U) fat(U) button(U) sgiioc4(U) tg3(U) dm_snapshot(U) 
dm_zero(U) dm_mirror(U) ext3(U) jbd(U) dm_mod(U) qla2300(U) qla2xxx(U) 
scsi_transport_fc(U) qla1280(U) mptscsih(U) mptbase(U) sd_mod(U) scsi_mod(U)

Pid: 2871, CPU 3, comm:                  cat
psr : 0000121008126010 ifs : 800000000000028d ip  : 
[<a00000010007ddf1>]    Not tainted
ip is at r_show+0x51/0x120
unat: 0000000000000000 pfs : 0000000000000894 rsc : 0000000000000003
rnat: 0000101008126010 bsps: a00000010022fe80 pr  : 000000000955a959
ldrs: 0000000000000000 ccv : 0000000000000000 fpsr: 0009804c8a70033f
csd : 0000000000000000 ssd : 0000000000000000
b0  : a00000010015ee70 b6  : a00000010007db80 b7  : a00000010007dda0
f6  : 0fffafffffffff0000000 f7  : 0ffdec000000000000000
f8  : 10002c000000000000000 f9  : 100038000000000000000
f10 : 0fffebffffffff4000000 f11 : 1003e0000000000000000
r1  : a00000010096a980 r2  : a000000100702a18 r3  : e00001b07be04748
r8  : 6b6b6b6b6b6b6b6b r9  : 6b6b6b6b6b6b6b8b r10 : a000000100634858
r11 : a00000010007dda0 r12 : e00000b0759afe00 r13 : e00000b0759a8000
r14 : 000000000000ffff r15 : ffffffffffffffff r16 : a000000100702a08
r17 : 6b6b6b6b6b6b6b6b r18 : 0000000000000062 r19 : e00000b0759afe20
r20 : a0000001005cfa00 r21 : 0000000000000270 r22 : a0000001005cf790
r23 : a000000100778a18 r24 : a0000001007124d3 r25 : 0000000000000073
r26 : e00000b0759afe10 r27 : ffffffffffffffff r28 : e00000b0759afdd0
r29 : 000000000000000b r30 : 000000000000000c r31 : fffffffffffffffe

Call Trace:
 [<a000000100016a40>] show_stack+0x80/0xa0
                                spà0000b0759af9b0 bspà0000b0759a9110
 [<a000000100017350>] show_regs+0x890/0x8c0
                                spà0000b0759afb80 bspà0000b0759a90c8
 [<a00000010003c970>] die+0x150/0x240
                                spà0000b0759afba0 bspà0000b0759a9088
 [<a00000010005d870>] ia64_do_page_fault+0x9f0/0xba0
                                spà0000b0759afba0 bspà0000b0759a9020
 [<a00000010000f480>] ia64_leave_kernel+0x0/0x260
                                spà0000b0759afc30 bspà0000b0759a9020
 [<a00000010007ddf0>] r_show+0x50/0x120
                                spà0000b0759afe00 bspà0000b0759a8fb0
 [<a00000010015ee70>] seq_read+0x730/0x940
                                spà0000b0759afe10 bspà0000b0759a8f28
 [<a000000100111590>] vfs_read+0x290/0x360
                                spà0000b0759afe20 bspà0000b0759a8ed8
 [<a000000100111bd0>] sys_read+0x70/0xe0
                                spà0000b0759afe20 bspà0000b0759a8e60


[root@altix3 m_001\x01_b_5_s_1]#


I'm close to what I think an appropriate solution is.  I could just remove
the erroneous call to pci_free_resources, however, I believe that this may
cause some drivers (that are dependent on the pci_free_resources call) to 
break. 

Since pci_free_resources is a legacy (deprecated?) call that we should modify
the code such that release_resources sets the appropriate pci_dev->res pointers
to null, and pci_free_resources only attempts to free a resource if the 
pointer is not NULL.

At that time we would output a warning message about the deprecation of the
call ... IMO, pci_free_resources should never be called.  

Of course, you could argue that the drivers are broken if they depend on 
pci_free_resources anyway ;)


P.

>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2005-03-10 18:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-09 18:38 Latest bk kernel does not properly free PCI IO & MEM allocations Prarit Bhargava
2005-03-10 15:07 ` Prarit Bhargava
2005-03-10 17:17 ` Greg KH
2005-03-10 18:16 ` Prarit Bhargava
2005-03-10 18:50 ` Prarit Bhargava [this message]
2005-03-10 23:23 ` Greg KH
2005-03-11 21:30 ` Prarit Bhargava
2005-03-12  7:38 ` Greg KH
2005-03-12 17:04 ` prarit
2005-03-13  0:49 ` Re: Latest bk kernel does not properly free PCI IO & MEM prarit
2005-03-15  6:11 ` Re: Latest bk kernel does not properly free PCI IO & MEM allocations Rajesh Shah
2005-03-15 12:55 ` Prarit Bhargava

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=423096F0.4060901@sgi.com \
    --to=prarit@sgi.com \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).