* sched-powersave causes oops on 2.6.26-08037-g8cd362a
@ 2008-07-28 21:48 Dave Hansen
2008-07-28 21:51 ` Andi Kleen
2008-07-28 21:55 ` Dave Hansen
0 siblings, 2 replies; 3+ messages in thread
From: Dave Hansen @ 2008-07-28 21:48 UTC (permalink / raw)
To: Andi Kleen; +Cc: Greg Kroah-Hartman, linux-kernel@vger.kernel.org
This oops just happens on startup for me.
$ uname -a
Linux nimitz 2.6.26-08037-g8cd362a #69 SMP Mon Jul 28 14:12:00 PDT 2008 i686 GNU/Linux
$ addr2line -e vmlinux c0126866
linux-2.6.git/kernel/sched.c:7660
static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt)
{
int ret;
HERE--> if (buf[0] != '0' && buf[0] != '1')
return -EINVAL;
if (smt)
sched_smt_power_savings = (buf[0] == '1');
else
sched_mc_power_savings = (buf[0] == '1');
ret = arch_reinit_sched_domains();
return ret ? ret : count;
}
Looks to me like someone managed to get a null 'buf' into there.
Although, it is a bit odd that the actual deref is at 00000002.
I'm assuming that this is coming from: 4a0b2b4dbe1335b8b9886ba3dc85a145d5d938ed.
[ 167.635123] mtrr: type mismatch for e0000000,10000000 old: write-back new: write-combining
[ 168.590082] iwl4965 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 168.590256] iwl4965 0000:03:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x40100106)
[ 168.590335] firmware: requesting iwlwifi-4965-2.ucode
[ 168.596984] iwl4965: iwlwifi-4965-2.ucode firmware file req failed: Reason -2
[ 168.611276] iwl4965: Could not read microcode: -2
[ 168.620708] iwl4965 0000:03:00.0: PCI INT A disabled
[ 186.857870] iwl4965 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 186.858083] iwl4965 0000:03:00.0: restoring config space at offset 0x1 (was 0x100102, writing 0x40100106)
[ 186.858161] firmware: requesting iwlwifi-4965-2.ucode
[ 186.861756] iwl4965: iwlwifi-4965-2.ucode firmware file req failed: Reason -2
[ 186.876051] iwl4965: Could not read microcode: -2
[ 186.885509] iwl4965 0000:03:00.0: PCI INT A disabled
[ 189.159655] BUG: unable to handle kernel NULL pointer dereference at 00000002
[ 189.171417] IP: [<c0126866>] sched_power_savings_store+0x16/0x60
[ 189.183509] *pdpt = 000000000ac15001 *pde = 0000000000000000
[ 189.183513] Oops: 0000 [#1] SMP
[ 189.188602] Modules linked in: dummy rfcomm l2cap nls_iso8859_1 vfat fat kvm_intel kvm tun ppdev acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave cpufreq_userspace cpufreq_conservative sbs container sbshc iptable_filter ip_tables x_tables deflate zlib_deflate des_generic cbc aes_generic xcbc sha256_generic sha1_generic af_key dm_crypt dm_mod lp snd_hda_intel snd_pcm_oss snd_pcm joydev snd_mixer_oss arc4 ecb crypto_blkcipher pcmcia snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq iwl4965 snd_timer snd_seq_device yenta_socket iwlcore rsrc_nonstatic usb_storage snd usbhid thinkpad_acpi mac80211 hid libusual psmouse rfkill parport_pc pcmcia_core video led_class soundcore parport serio_raw cfg80211 evdev button snd_page_alloc nvram ohci1394 ieee1394 ehci_hcd uhci_hcd usbcore thermal processor fan fuse
[ 189.188602]
[ 189.188602] Pid: 7113, comm: sched-powersave Not tainted (2.6.26-08037-g8cd362a #69)
[ 189.188602] EIP: 0060:[<c0126866>] EFLAGS: 00010292 CPU: 0
[ 189.188602] EIP is at sched_power_savings_store+0x16/0x60
[ 189.188602] EAX: 00000002 EBX: 00000000 ECX: ffffffea EDX: c04b73f8
[ 189.188602] ESI: c04b73f8 EDI: cac49000 EBP: cac7bf24 ESP: cac7bf1c
[ 189.188602] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[ 189.188602] Process sched-powersave (pid: 7113, ti=cac7b000 task=cac8b000 task.ti=cac7b000)
[ 189.188602] Stack: c01268d0 c04b7704 cac7bf2c c01268df cac7bf40 c02a1ddb c04b73f8 f6c0b6f0
[ 189.188602] c04b7704 cac7bf6c c01d530b 00000002 080fc408 cb729800 cd84bc54 00000002
[ 189.188602] c04b73f8 cb729800 080fc408 00000002 cac7bf90 c018dba6 cac7bf9c cb729800
[ 189.188602] Call Trace:
[ 189.188602] [<c01268d0>] ? sched_mc_power_savings_store+0x0/0x20
[ 189.188602] [<c01268df>] ? sched_mc_power_savings_store+0xf/0x20
[ 189.188602] [<c02a1ddb>] ? sysdev_class_store+0x2b/0x40
[ 189.188602] [<c01d530b>] ? sysfs_write_file+0xbb/0x110
[ 189.188602] [<c018dba6>] ? vfs_write+0x96/0x130
[ 189.188602] [<c01d5250>] ? sysfs_write_file+0x0/0x110
[ 189.188602] [<c018e0cd>] ? sys_write+0x3d/0x70
[ 189.188602] [<c0103d3f>] ? sysenter_do_call+0x12/0x33
[ 189.188602] [<c0380000>] ? pci_bus_assign_resources+0x220/0x4c6
[ 189.188602] =======================
[ 189.188602] Code: c9 31 d2 e8 6d fd ff ff e8 58 61 00 00 31 c0 5d c3 8d 74 26 00 55 89 e5 83 ec 08 89 1c 24 89 cb b9 ea ff ff ff 89 74 24 04 89 d6 <0f> b6 10 8d 42 d0 3c 01 76 10 8b 1c 24 89 c8 8b 74 24 04 89 ec
[ 189.188602] EIP: [<c0126866>] sched_power_savings_store+0x16/0x60 SS:ESP 0068:cac7bf1c
[ 189.643173] ---[ end trace 9d31c0bef6b8b1a8 ]---
-- Dave
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: sched-powersave causes oops on 2.6.26-08037-g8cd362a 2008-07-28 21:48 sched-powersave causes oops on 2.6.26-08037-g8cd362a Dave Hansen @ 2008-07-28 21:51 ` Andi Kleen 2008-07-28 21:55 ` Dave Hansen 1 sibling, 0 replies; 3+ messages in thread From: Andi Kleen @ 2008-07-28 21:51 UTC (permalink / raw) To: Dave Hansen; +Cc: Andi Kleen, Greg Kroah-Hartman, linux-kernel@vger.kernel.org On Mon, Jul 28, 2008 at 02:48:59PM -0700, Dave Hansen wrote: > This oops just happens on startup for me. Patch has been already posted a couple of times, here is it again. -Andi Author: Andi Kleen <ak@gargoyle.(none)> Date: Thu Jul 24 21:57:40 2008 +0200 Make scheduler sysfs attributes sysdev class devices They are really class devices, but were incorrectly declared. This leads to crashes with the recent changes that makes non normal sysdevs use a different prototype. Signed-off-by: Andi Kleen <ak@linux.intel.com> diff --git a/kernel/sched.c b/kernel/sched.c index 6acf749..24358ca 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -7641,34 +7641,34 @@ static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) } #ifdef CONFIG_SCHED_MC -static ssize_t sched_mc_power_savings_show(struct sys_device *dev, - struct sysdev_attribute *attr, char *page) +static ssize_t sched_mc_power_savings_show(struct sysdev_class *class, + char *page) { return sprintf(page, "%u\n", sched_mc_power_savings); } -static ssize_t sched_mc_power_savings_store(struct sys_device *dev, - struct sysdev_attribute *attr, +static ssize_t sched_mc_power_savings_store(struct sysdev_class *class, const char *buf, size_t count) { return sched_power_savings_store(buf, count, 0); } -static SYSDEV_ATTR(sched_mc_power_savings, 0644, sched_mc_power_savings_show, - sched_mc_power_savings_store); +static SYSDEV_CLASS_ATTR(sched_mc_power_savings, 0644, + sched_mc_power_savings_show, + sched_mc_power_savings_store); #endif #ifdef CONFIG_SCHED_SMT -static ssize_t sched_smt_power_savings_show(struct sys_device *dev, - struct sysdev_attribute *attr, char *page) +static ssize_t sched_smt_power_savings_show(struct sysdev_class *dev, + char *page) { return sprintf(page, "%u\n", sched_smt_power_savings); } -static ssize_t sched_smt_power_savings_store(struct sys_device *dev, - struct sysdev_attribute *attr, +static ssize_t sched_smt_power_savings_store(struct sysdev_class *dev, const char *buf, size_t count) { return sched_power_savings_store(buf, count, 1); } -static SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show, +static SYSDEV_CLASS_ATTR(sched_smt_power_savings, 0644, + sched_smt_power_savings_show, sched_smt_power_savings_store); #endif ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: sched-powersave causes oops on 2.6.26-08037-g8cd362a 2008-07-28 21:48 sched-powersave causes oops on 2.6.26-08037-g8cd362a Dave Hansen 2008-07-28 21:51 ` Andi Kleen @ 2008-07-28 21:55 ` Dave Hansen 1 sibling, 0 replies; 3+ messages in thread From: Dave Hansen @ 2008-07-28 21:55 UTC (permalink / raw) To: Andi Kleen; +Cc: Greg Kroah-Hartman, linux-kernel@vger.kernel.org On Mon, 2008-07-28 at 14:49 -0700, Dave Hansen wrote: > This oops just happens on startup for me. > > $ uname -a > Linux nimitz 2.6.26-08037-g8cd362a #69 SMP Mon Jul 28 14:12:00 PDT 2008 i686 GNU/Linux > > $ addr2line -e vmlinux c0126866 > linux-2.6.git/kernel/sched.c:7660 > > static ssize_t sched_power_savings_store(const char *buf, size_t count, int smt) > { > int ret; > > HERE--> if (buf[0] != '0' && buf[0] != '1') > return -EINVAL; OK, I just found Andi's patch to fix this. Have you sent it to Linus, yet? -- Dave ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-28 21:56 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-07-28 21:48 sched-powersave causes oops on 2.6.26-08037-g8cd362a Dave Hansen 2008-07-28 21:51 ` Andi Kleen 2008-07-28 21:55 ` Dave Hansen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox