All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@huawei.com>
To: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Taku Izumi <izumi.taku@jp.fujitsu.com>,
	Tony Luck <tony.luck@intel.com>,
	Huang Ying <ying.huang@intel.com>,
	Bob Moore <robert.moore@intel.com>, Len Brown <lenb@kernel.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-pci@vger.kernel.org, Jiang Liu <liuj97@gmail.com>,
	Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [RFC PATCH v2 10/16] ACPIHP: system device hotplug driver skeleton
Date: Thu, 9 Aug 2012 17:36:22 +0800	[thread overview]
Message-ID: <50238496.1000504@huawei.com> (raw)
In-Reply-To: <502377C0.70401@cn.fujitsu.com>

On 2012-8-9 16:41, Tang Chen wrote:
> Hi Liu ~
> 
> On 08/09/2012 03:40 PM, Jiang Liu wrote:
>> Hi Tang,
>> 	Thanks for testing.
>> 	Currently there's a limitation that you need to insert acpihp_enum driver first.
> 
> Sorry, I didn't make it clear. I did load acpihp_enum module first, and then load acpihp_drv.
> 
> And I just tried it some more times. It just hung up, but dmesg had no output.
> Like this:
> 
> # modprobe acpihp_enum
> (OK, and sysfs interfaces have been created)
> # modprobe acpihp_drv
> (hang up)
> 
> # dmesg
> (nothing)
> 
> The "modprobe acpihp_drv" process's call trace shows that it hung at the following function:
> #0  0x00000032836aab80 in __nanosleep_nocancel () from /lib64/libc.so.6
> #1  0x00000032836deb64 in usleep () from /lib64/libc.so.6
> ......
> 
> I have tried several times and I cannot reproduce the situation I just said.
You can reproduce it by loading acpihp_drv without acpihp_enum driver, I guess.
The acpihp_drv module_init() should call acpihp_register_class() to initialize the core.

> Maybe my box has something different with yours. And I'll try to find out why.
> 
> Thanks for your advice. :)
> 
>> Will fix this issue in next version.
>> 	Regards!
>> 	Gerry
>>
>> On 2012-8-9 15:12, Tang Chen wrote:
>>> Hi Liu~
>>>
>>> I compiled this driver as a module, acpihp_drv. And when I loaded this module, it
>>> gave the following error message:
>>>
>>> # modprobe acpihp_drv
>>> (the command hangs up, no return after 10 min)
>>>
>>> #dmesg
>>> ......
>>> [  126.643350] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078
>>> [  126.644007] IP: [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007] PGD 105277a067 PUD 104f823067 PMD 0 
>>> [  126.644007] Oops: 0002 [#1] SMP 
>>> [  126.644007] Modules linked in: acpihp_drv(+) ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat iptable_mangle bridge stp llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 vhost_net macvtap macvlan tun uinput iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm crc32c_intel microcode lpc_ich mfd_core pcspkr i2c_i801 i2c_core ioatdma e1000e acpi_memhotplug i7core_edac edac_core igb dca mptsas mptscsih mptbase scsi_transport_sas
>>> [  126.644007] CPU 10 
>>> [  126.644007] Pid: 2821, comm: modprobe Tainted: G       A     3.6.0-rc1+ #6 FUJITSU-SV PRIMEQUEST 1800E/SB
>>> [  126.644007] RIP: 0010:[<ffffffff814c0cd3>]  [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007] RSP: 0018:ffff8810589a9de8  EFLAGS: 00010246
>>> [  126.644007] RAX: 0000000000000000 RBX: 0000000000000078 RCX: 0000000000000000
>>> [  126.644007] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000078
>>> [  126.644007] RBP: ffff8810589a9e08 R08: 0000000000000000 R09: ffff8810589a9d88
>>> [  126.644007] R10: 00000000000013e5 R11: 00000000000013e5 R12: ffffffffa01460d0
>>> [  126.644007] R13: 0000000000000000 R14: ffffffffa014732b R15: 00000000000000bf
>>> [  126.644007] FS:  00007fecb1802700(0000) GS:ffff88105e640000(0000) knlGS:0000000000000000
>>> [  126.644007] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> [  126.644007] CR2: 0000000000000078 CR3: 0000001052772000 CR4: 00000000000007e0
>>> [  126.644007] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>>> [  126.644007] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>>> [  126.644007] Process modprobe (pid: 2821, threadinfo ffff8810589a8000, task ffff8810592f8000)
>>> [  126.644007] Stack:
>>> [  126.644007]  ffff8810589a9e08 ffffffff810be37f ffffffffa0146220 ffffffff81a7b390
>>> [  126.644007]  ffff8810589a9e58 ffffffff81317eb3 ffff8810589a9e48 0000000000000000
>>> [  126.644007]  ffffffff81a342c0 ffffffff81a342e0 0000000000000000 ffffffffa0146220
>>> [  126.644007] Call Trace:
>>> [  126.644007]  [<ffffffff810be37f>] ? tracepoint_module_notify+0xd9/0x14a
>>> [  126.644007]  [<ffffffff81317eb3>] class_interface_register+0x4a/0xbc
>>> [  126.644007]  [<ffffffffa00b8000>] ? 0xffffffffa00b7fff
>>> [  126.644007]  [<ffffffffa00b8010>] acpihp_drv_init+0x10/0x12 [acpihp_drv]
>>> [  126.644007]  [<ffffffff8100207f>] do_one_initcall+0x7f/0x139
>>> [  126.644007]  [<ffffffff81093414>] sys_init_module+0x12d3/0x14e3
>>> [  126.644007]  [<ffffffff81264b0d>] ? ddebug_dyndbg_boot_param_cb+0x45/0x45
>>> [  126.644007]  [<ffffffff814c9469>] system_call_fastpath+0x16/0x1b
>>> [  126.644007] Code: 48 8b 04 25 80 c6 00 00 48 89 43 18 31 c0 5b 5b c9 c3 55 48 89 e5 53 48 83 ec 18 66 66 66 66 90 48 89 fb e8 5a 0c 00 00 48 89 df <f0> ff 0f 79 05 e8 06 ff ff ff 65 48 8b 04 25 80 c6 00 00 48 89 
>>> [  126.644007] RIP  [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007]  RSP <ffff8810589a9de8>
>>> [  126.644007] CR2: 0000000000000078
>>> [  129.981335] ---[ end trace da17e9c9de8dd560 ]---
>>> [  139.085895] nr_pdflush_threads exported in /proc is scheduled for removal
>>> [  139.167394] sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case.  If you have one, please send an email to linux-mm@kvack.org.
>>>
>>> Looks like it dereferenced a NULL pointer here.
>>> May be it was my mistake that I didn't configure the environment correctly.
>>> Would you please give me some advice ?
>>>
>>> Thanks. :)
>>>
>>>
> 



WARNING: multiple messages have this Message-ID (diff)
From: Jiang Liu <jiang.liu@huawei.com>
To: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
	Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>,
	Wen Congyang <wency@cn.fujitsu.com>,
	Taku Izumi <izumi.taku@jp.fujitsu.com>,
	Tony Luck <tony.luck@intel.com>,
	Huang Ying <ying.huang@intel.com>,
	Bob Moore <robert.moore@intel.com>, Len Brown <lenb@kernel.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
	<linux-pci@vger.kernel.org>, Jiang Liu <liuj97@gmail.com>,
	Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [RFC PATCH v2 10/16] ACPIHP: system device hotplug driver skeleton
Date: Thu, 9 Aug 2012 17:36:22 +0800	[thread overview]
Message-ID: <50238496.1000504@huawei.com> (raw)
In-Reply-To: <502377C0.70401@cn.fujitsu.com>

On 2012-8-9 16:41, Tang Chen wrote:
> Hi Liu ~
> 
> On 08/09/2012 03:40 PM, Jiang Liu wrote:
>> Hi Tang,
>> 	Thanks for testing.
>> 	Currently there's a limitation that you need to insert acpihp_enum driver first.
> 
> Sorry, I didn't make it clear. I did load acpihp_enum module first, and then load acpihp_drv.
> 
> And I just tried it some more times. It just hung up, but dmesg had no output.
> Like this:
> 
> # modprobe acpihp_enum
> (OK, and sysfs interfaces have been created)
> # modprobe acpihp_drv
> (hang up)
> 
> # dmesg
> (nothing)
> 
> The "modprobe acpihp_drv" process's call trace shows that it hung at the following function:
> #0  0x00000032836aab80 in __nanosleep_nocancel () from /lib64/libc.so.6
> #1  0x00000032836deb64 in usleep () from /lib64/libc.so.6
> ......
> 
> I have tried several times and I cannot reproduce the situation I just said.
You can reproduce it by loading acpihp_drv without acpihp_enum driver, I guess.
The acpihp_drv module_init() should call acpihp_register_class() to initialize the core.

> Maybe my box has something different with yours. And I'll try to find out why.
> 
> Thanks for your advice. :)
> 
>> Will fix this issue in next version.
>> 	Regards!
>> 	Gerry
>>
>> On 2012-8-9 15:12, Tang Chen wrote:
>>> Hi Liu~
>>>
>>> I compiled this driver as a module, acpihp_drv. And when I loaded this module, it
>>> gave the following error message:
>>>
>>> # modprobe acpihp_drv
>>> (the command hangs up, no return after 10 min)
>>>
>>> #dmesg
>>> ......
>>> [  126.643350] BUG: unable to handle kernel NULL pointer dereference at 0000000000000078
>>> [  126.644007] IP: [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007] PGD 105277a067 PUD 104f823067 PMD 0 
>>> [  126.644007] Oops: 0002 [#1] SMP 
>>> [  126.644007] Modules linked in: acpihp_drv(+) ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat iptable_mangle bridge stp llc sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables ipv6 vhost_net macvtap macvlan tun uinput iTCO_wdt iTCO_vendor_support coretemp kvm_intel kvm crc32c_intel microcode lpc_ich mfd_core pcspkr i2c_i801 i2c_core ioatdma e1000e acpi_memhotplug i7core_edac edac_core igb dca mptsas mptscsih mptbase scsi_transport_sas
>>> [  126.644007] CPU 10 
>>> [  126.644007] Pid: 2821, comm: modprobe Tainted: G       A     3.6.0-rc1+ #6 FUJITSU-SV PRIMEQUEST 1800E/SB
>>> [  126.644007] RIP: 0010:[<ffffffff814c0cd3>]  [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007] RSP: 0018:ffff8810589a9de8  EFLAGS: 00010246
>>> [  126.644007] RAX: 0000000000000000 RBX: 0000000000000078 RCX: 0000000000000000
>>> [  126.644007] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000078
>>> [  126.644007] RBP: ffff8810589a9e08 R08: 0000000000000000 R09: ffff8810589a9d88
>>> [  126.644007] R10: 00000000000013e5 R11: 00000000000013e5 R12: ffffffffa01460d0
>>> [  126.644007] R13: 0000000000000000 R14: ffffffffa014732b R15: 00000000000000bf
>>> [  126.644007] FS:  00007fecb1802700(0000) GS:ffff88105e640000(0000) knlGS:0000000000000000
>>> [  126.644007] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
>>> [  126.644007] CR2: 0000000000000078 CR3: 0000001052772000 CR4: 00000000000007e0
>>> [  126.644007] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
>>> [  126.644007] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
>>> [  126.644007] Process modprobe (pid: 2821, threadinfo ffff8810589a8000, task ffff8810592f8000)
>>> [  126.644007] Stack:
>>> [  126.644007]  ffff8810589a9e08 ffffffff810be37f ffffffffa0146220 ffffffff81a7b390
>>> [  126.644007]  ffff8810589a9e58 ffffffff81317eb3 ffff8810589a9e48 0000000000000000
>>> [  126.644007]  ffffffff81a342c0 ffffffff81a342e0 0000000000000000 ffffffffa0146220
>>> [  126.644007] Call Trace:
>>> [  126.644007]  [<ffffffff810be37f>] ? tracepoint_module_notify+0xd9/0x14a
>>> [  126.644007]  [<ffffffff81317eb3>] class_interface_register+0x4a/0xbc
>>> [  126.644007]  [<ffffffffa00b8000>] ? 0xffffffffa00b7fff
>>> [  126.644007]  [<ffffffffa00b8010>] acpihp_drv_init+0x10/0x12 [acpihp_drv]
>>> [  126.644007]  [<ffffffff8100207f>] do_one_initcall+0x7f/0x139
>>> [  126.644007]  [<ffffffff81093414>] sys_init_module+0x12d3/0x14e3
>>> [  126.644007]  [<ffffffff81264b0d>] ? ddebug_dyndbg_boot_param_cb+0x45/0x45
>>> [  126.644007]  [<ffffffff814c9469>] system_call_fastpath+0x16/0x1b
>>> [  126.644007] Code: 48 8b 04 25 80 c6 00 00 48 89 43 18 31 c0 5b 5b c9 c3 55 48 89 e5 53 48 83 ec 18 66 66 66 66 90 48 89 fb e8 5a 0c 00 00 48 89 df <f0> ff 0f 79 05 e8 06 ff ff ff 65 48 8b 04 25 80 c6 00 00 48 89 
>>> [  126.644007] RIP  [<ffffffff814c0cd3>] mutex_lock+0x19/0x37
>>> [  126.644007]  RSP <ffff8810589a9de8>
>>> [  126.644007] CR2: 0000000000000078
>>> [  129.981335] ---[ end trace da17e9c9de8dd560 ]---
>>> [  139.085895] nr_pdflush_threads exported in /proc is scheduled for removal
>>> [  139.167394] sysctl: The scan_unevictable_pages sysctl/node-interface has been disabled for lack of a legitimate use case.  If you have one, please send an email to linux-mm@kvack.org.
>>>
>>> Looks like it dereferenced a NULL pointer here.
>>> May be it was my mistake that I didn't configure the environment correctly.
>>> Would you please give me some advice ?
>>>
>>> Thanks. :)
>>>
>>>
> 



  reply	other threads:[~2012-08-09  9:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 12:13 [RFC PATCH v2 00/16] ACPI based system device hotplug framework Jiang Liu
2012-08-04 12:13 ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 01/16] ACPIHP: introduce a framework for ACPI based system device hotplug Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 02/16] ACPIHP: ACPI system device hotplug slot enumerator Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 03/16] ACPIHP: detect ACPI hotplug slots by checking ACPI _EJ0 method Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 04/16] ACPI: introduce interfaces to manage ACPI device reference count Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 05/16] ACPIHP: scan and walk ACPI devices connecting to an ACPI hotplug slot Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 06/16] ACPIHP: group devices connecting to a hotplug slot according to device types Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 07/16] ACPIHP: add callbacks into acpi_device_ops to support new hotplug framework Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 08/16] ACPIHP: provide interfaces to associate driver specific data to hotplug slots Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 09/16] ACPIHP: implement utility functions to support system device hotplug Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 10/16] ACPIHP: system device hotplug driver skeleton Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-09  7:12   ` Tang Chen
2012-08-09  7:40     ` Jiang Liu
2012-08-09  7:40       ` Jiang Liu
2012-08-09  8:41       ` Tang Chen
2012-08-09  9:36         ` Jiang Liu [this message]
2012-08-09  9:36           ` Jiang Liu
2012-08-10  4:39           ` Tang Chen
2012-08-04 12:13 ` [RFC PATCH v2 11/16] ACPIHP: analyse dependences among ACPI system device hotplug slots Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:13 ` [RFC PATCH v2 12/16] ACPIHP: cancel inprogress ACPI system device hotplug operations Jiang Liu
2012-08-04 12:13   ` Jiang Liu
2012-08-04 12:14 ` [RFC PATCH v2 13/16] ACPIHP: configure/unconfigure system devices connecting to a hotplug slot Jiang Liu
2012-08-04 12:14   ` Jiang Liu
2012-08-04 12:14 ` [RFC PATCH v2 14/16] ACPIHP: implement the state machine for ACPI hotplug slots Jiang Liu
2012-08-04 12:14   ` Jiang Liu
2012-08-04 12:14 ` [RFC PATCH v2 15/16] ACPIHP: implement ACPI hotplug sysfs interfaces Jiang Liu
2012-08-04 12:14   ` Jiang Liu
2012-08-04 12:14 ` [RFC PATCH v2 16/16] ACPIHP: enhance ACPI container driver to support new hotplug framework Jiang Liu
2012-08-04 12:14   ` Jiang Liu
2012-08-07 23:38 ` [RFC PATCH v2 00/16] ACPI based system device " Toshi Kani
2012-08-08 15:44   ` Jiang Liu
2012-08-08 16:27     ` Bjorn Helgaas
2012-08-09 15:24       ` Jiang Liu
2012-08-08 21:05     ` Toshi Kani

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=50238496.1000504@huawei.com \
    --to=jiang.liu@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=guohanjun@huawei.com \
    --cc=isimatu.yasuaki@jp.fujitsu.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=kaneshige.kenji@jp.fujitsu.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=robert.moore@intel.com \
    --cc=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=tangchen@cn.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=wency@cn.fujitsu.com \
    --cc=ying.huang@intel.com \
    --cc=yinghai@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.