From patchwork Wed Sep 26 19:51:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 1511941 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 67A7DDFE80 for ; Thu, 27 Sep 2012 06:36:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C62D9F39B for ; Wed, 26 Sep 2012 23:36:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f177.google.com (mail-qc0-f177.google.com [209.85.216.177]) by gabe.freedesktop.org (Postfix) with ESMTP id A8AD99E74F for ; Wed, 26 Sep 2012 12:52:17 -0700 (PDT) Received: by qcsu28 with SMTP id u28so867198qcs.36 for ; Wed, 26 Sep 2012 12:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=I85DsgzPGUbbteQK9YDwD+t/qw+YOBqgVnTx5rixJG0=; b=GF+JxlOnGLwy+RrqZ31Ae/O9Vb3M339k+UQWn4J44w8KUaNPXKmk4t3LsV2RG/ILHv mnVdPnj4GOQo3QUeVFcnw3rLGCKefgcXXAy2yzMVGEai+lHVreNjnJg18wSUwGsRgx/h VJFLq1kxj8wH+ETTwsta9u4UtNzqGP3etWT1dmZ3JtF8lI+NXyiuMzCSCEzg6TArI7n7 sCrlRtaOO+ZC2zwxyP9ko4PDXTbfBYt5y1aaNRvSHkFrqxvKn20gKg0tqW0nXaQSZCKo gjryDnR9tmc7dmKDFY7TGizMCQLX+er4Bufx5pOIs/tYpwC1kNzVlW55QYFYbWrdQNNO LiNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=I85DsgzPGUbbteQK9YDwD+t/qw+YOBqgVnTx5rixJG0=; b=VRT3nHY83n2Tgs6q6HuqPfH47SPe4qDd9UhoSJUL5NxwQ+W+223Fhv/kxiX2iEjfPd p/gFyS1KLUghOtSm2SiQXgthDYa7H5EyLeTTvKuguWQIgNZ0017gooUrvonbRKJ1opxv E/rA2m5FnqxSPdSoOAmSCz0aSHSweTabZsz9nsa/xZn5cvrf2Mou9SclT6+4SLMhwO3P lJH2KlvRc3sRz5Lpc4K9J2fXsfZKJ3Dpb5C0TdJeAp0mso8t3x4qAkkqQWHDn9acBOJX QmrULl1zXm5XK/en5DXUZ3hY1raEXvyW5vLY0bnRNX6b4iuGuZcCWtoT6VYhqHh1gdIn WGfQ== Received: by 10.224.189.12 with SMTP id dc12mr4462181qab.59.1348689136883; Wed, 26 Sep 2012 12:52:16 -0700 (PDT) Received: by 10.224.189.12 with SMTP id dc12mr4462148qab.59.1348689136730; Wed, 26 Sep 2012 12:52:16 -0700 (PDT) Received: from [2620:0:1000:fd2e:224:d7ff:fee2:b75c] ([2620:0:1000:fd2e:224:d7ff:fee2:b75c]) by mx.google.com with ESMTPS id dp3sm5840707qab.21.2012.09.26.12.52.12 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 26 Sep 2012 12:52:14 -0700 (PDT) Date: Wed, 26 Sep 2012 12:51:30 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Sedat Dilek Subject: Re: inux-next: Tree for Sept 26 (not bootable on AMD64: thermal|acpi|drm/i915|pci related?) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnh11lUOG7s9LDxRW3XNfFDQQvdxHqiKBiKqLVO1YhgJnZijA1f64ihyatqU9qp/Ib+jahVHxN2hgE6UAJdc1tsU001b0vdMH7vKAyFkEconJJQuncBhvRl4OKTar7LAb3KA2pI4JWc8FMTgrWjiJmyWBxMQqLoNKH5bpDAdx+2IoDW+1sdAdJPjpLiBi0RI22lfcSpaRG+y2UsiSzQugbsfVL8NA== X-Mailman-Approved-At: Wed, 26 Sep 2012 23:33:15 -0700 Cc: Stephen Rothwell , durgadoss.r@intel.com, Daniel Vetter , linux-kernel@vger.kernel.org, DRI , "Rafael J. Wysocki" , Linux ACPI , linux-next@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas , Andrew Morton , Zhang Rui , Dan Carpenter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org On Wed, 26 Sep 2012, Sedat Dilek wrote: > > on my Ubuntu/precise AMD64 today's Linux-Next runs into the following > call-trace (machine freezes): > > Sep 26 19:22:58 fambox kernel: [ 11.124739] BUG: unable to handle > kernel NULL pointer dereference at 0000000000000018 > Sep 26 19:22:58 fambox kernel: [ 11.124806] IP: [] > thermal_cooling_device_register+0x2c8/0x3d0 > Sep 26 19:22:58 fambox kernel: [ 11.124869] PGD 0 > Sep 26 19:22:58 fambox kernel: [ 11.124895] Oops: 0000 [#1] SMP > Sep 26 19:22:58 fambox kernel: [ 11.124919] Modules linked in: > coretemp kvm_intel kvm snd_hda_intel(+) arc4 snd_hda_codec iwldvm > snd_hwdep ghash_clmulni_intel snd_pcm aesni_intel uvcvideo mac80211 > aes_x86_64 snd_page_alloc ablk_helper i915(+) snd_seq_midi cryptd > videobuf2_vmalloc snd_seq_midi_event xts videobuf2_memops lrw > snd_rawmidi videobuf2_core joydev gf128mul videodev snd_seq > snd_seq_device hid_generic snd_timer drm_kms_helper iwlwifi drm snd > psmouse i2c_algo_bit soundcore btusb microcode serio_raw > samsung_laptop wmi cfg80211 bluetooth mei mac_hid video lpc_ich lp > parport ext4 jbd2 usbhid hid r8169 > Sep 26 19:22:58 fambox kernel: [ 11.125319] CPU 2 > Sep 26 19:22:58 fambox kernel: [ 11.125332] Pid: 579, comm: modprobe > Not tainted 3.6.0-rc7-next20120926-2-iniza-generic #1 SAMSUNG > ELECTRONICS CO., LTD. 530U3BI/530U4BI/530U4BH/530U3BI/530U4BI/530U4BH > Sep 26 19:22:58 fambox kernel: [ 11.125401] RIP: > 0010:[] [] > thermal_cooling_device_register+0x2c8/0x3d0 > Sep 26 19:22:58 fambox kernel: [ 11.125450] RSP: > 0018:ffff88010f23d838 EFLAGS: 00010246 > Sep 26 19:22:58 fambox kernel: [ 11.125475] RAX: 0000000000000000 > RBX: ffff88010bfd4c00 RCX: 0000000000000001 > Sep 26 19:22:58 fambox kernel: [ 11.125507] RDX: 0000000000000000 > RSI: 0000000000000282 RDI: 0000000000000282 > Sep 26 19:22:58 fambox kernel: [ 11.125539] RBP: ffff88010f23d878 > R08: 0000000000000000 R09: 0000000000000001 > Sep 26 19:22:58 fambox kernel: [ 11.125570] R10: ffff8801054fc460 > R11: 0000000000000000 R12: ffff88010bfd4c04 > Sep 26 19:22:58 fambox kernel: [ 11.125602] R13: ffff88011a73e000 > R14: 0000000000000000 R15: 0000000000000000 > Sep 26 19:22:58 fambox kernel: [ 11.125634] FS: > 00007f6b8da29700(0000) GS:ffff88011fa80000(0000) > knlGS:0000000000000000 > Sep 26 19:22:58 fambox kernel: [ 11.125670] CS: 0010 DS: 0000 ES: > 0000 CR0: 0000000080050033 > Sep 26 19:22:58 fambox kernel: [ 11.125697] CR2: 0000000000000018 > CR3: 0000000110185000 CR4: 00000000000407e0 > Sep 26 19:22:58 fambox kernel: [ 11.125729] DR0: 0000000000000000 > DR1: 0000000000000000 DR2: 0000000000000000 > Sep 26 19:22:58 fambox kernel: [ 11.125761] DR3: 0000000000000000 > DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Sep 26 19:22:58 fambox kernel: [ 11.125793] Process modprobe (pid: > 579, threadinfo ffff88010f23c000, task ffff880116648000) > Sep 26 19:22:58 fambox kernel: [ 11.127133] Stack: > Sep 26 19:22:58 fambox kernel: [ 11.128461] ffff88011a5d9098 > ffff88010d74c300 ffff88010f23d878 ffff880110b06480 > Sep 26 19:22:58 fambox kernel: [ 11.129755] ffff88010bfd1000 > ffff88011a5d9098 ffff88010d74c300 ffff88011a625000 > Sep 26 19:22:58 fambox kernel: [ 11.130943] ffff88010f23d958 > ffffffffa00e5868 0000000000000000 ffffffff811fa033 > Sep 26 19:22:58 fambox kernel: [ 11.132749] Call Trace: > Sep 26 19:22:58 fambox kernel: [ 11.133939] [] > acpi_video_bus_add+0x9ba/0xce6 [video] > Sep 26 19:22:58 fambox kernel: [ 11.135130] [] ? > sysfs_addrm_finish+0x33/0xc0 > Sep 26 19:22:58 fambox kernel: [ 11.136313] [] > acpi_device_probe+0x4e/0x11c > Sep 26 19:22:58 fambox kernel: [ 11.137482] [] > driver_probe_device+0x7b/0x240 > Sep 26 19:22:58 fambox kernel: [ 11.138642] [] > __driver_attach+0xab/0xb0 > Sep 26 19:22:58 fambox kernel: [ 11.139798] [] ? > driver_probe_device+0x240/0x240 > Sep 26 19:22:58 fambox kernel: [ 11.140981] [] > bus_for_each_dev+0x56/0x90 > Sep 26 19:22:58 fambox kernel: [ 11.142129] [] > driver_attach+0x1e/0x20 > Sep 26 19:22:58 fambox kernel: [ 11.143264] [] > bus_add_driver+0x190/0x290 > Sep 26 19:22:58 fambox kernel: [ 11.144443] [] > driver_register+0x7a/0x160 > Sep 26 19:22:58 fambox kernel: [ 11.145583] [] > acpi_bus_register_driver+0x43/0x45 > Sep 26 19:22:58 fambox kernel: [ 11.146871] [] > acpi_video_register+0x20/0x39 [video] > Sep 26 19:22:58 fambox kernel: [ 11.148167] [] > i915_driver_load+0x83d/0xea0 [i915] > Sep 26 19:22:58 fambox kernel: [ 11.149451] [] > drm_get_pci_dev+0x191/0x2b0 [drm] > Sep 26 19:22:58 fambox kernel: [ 11.150739] [] > i915_pci_probe+0x4f/0x57 [i915] > Sep 26 19:22:58 fambox kernel: [ 11.152015] [] > local_pci_probe+0x79/0x100 > Sep 26 19:22:58 fambox kernel: [ 11.153287] [] > pci_device_probe+0x109/0x130 > Sep 26 19:22:58 fambox kernel: [ 11.154546] [] > driver_probe_device+0x7b/0x240 > Sep 26 19:22:58 fambox kernel: [ 11.155796] [] > __driver_attach+0xab/0xb0 > Sep 26 19:22:58 fambox kernel: [ 11.157048] [] ? > driver_probe_device+0x240/0x240 > Sep 26 19:22:58 fambox kernel: [ 11.158280] [] > bus_for_each_dev+0x56/0x90 > Sep 26 19:22:58 fambox kernel: [ 11.159496] [] > driver_attach+0x1e/0x20 > Sep 26 19:22:58 fambox kernel: [ 11.160708] [] > bus_add_driver+0x190/0x290 > Sep 26 19:22:58 fambox kernel: [ 11.161909] [] > driver_register+0x7a/0x160 > Sep 26 19:22:58 fambox kernel: [ 11.163121] [] > __pci_register_driver+0x49/0x50 > Sep 26 19:22:58 fambox kernel: [ 11.164227] [] > drm_pci_init+0x11a/0x130 [drm] > Sep 26 19:22:58 fambox kernel: [ 11.165295] [] ? > 0xffffffffa037bfff > Sep 26 19:22:58 fambox kernel: [ 11.166351] [] > i915_init+0x66/0x68 [i915] > Sep 26 19:22:58 fambox kernel: [ 11.167360] [] > do_one_initcall+0x3f/0x170 > Sep 26 19:22:58 fambox kernel: [ 11.168332] [] > sys_init_module+0xbe/0x220 > Sep 26 19:22:58 fambox kernel: [ 11.169276] [] > system_call_fastpath+0x1a/0x1f > Sep 26 19:22:58 fambox kernel: [ 11.170200] Code: 1b 7e 00 48 3d c0 > cb c9 81 4c 8d a8 b0 fc ff ff 0f 84 bf 00 00 00 0f 1f 44 00 00 4d 8b > bd f0 02 00 00 4d 85 ff 0f 84 c0 00 00 00 <49> 8b 77 18 48 85 f6 0f 84 > d3 fe ff ff 41 8b 47 14 85 c0 7e 7b > Sep 26 19:22:58 fambox kernel: [ 11.172467] RIP > [] thermal_cooling_device_register+0x2c8/0x3d0 > Sep 26 19:22:58 fambox kernel: [ 11.173542] RSP > Sep 26 19:22:58 fambox kernel: [ 11.174603] CR2: 0000000000000018 > Sep 26 19:22:58 fambox kernel: [ 11.175675] ---[ end trace > 0f2bc437662fc097 ]--- > > I have CCed some maintainers, hope they might have a look at it > (sorry, didnt check any MLs). > > My kern.log and kernel-config are attached. I get oops in bind_cdev() called from thermal_cooling_device_register() on mmotm, I expect yours is the same (but bind_cdev inlined so it doesn't appear in the backtrace). This patch gets me booting (note it also fixes return to break to unlock the mutex), does it help you? Whether the root problem is elsewhere or not, I've no idea; but I see Dan already spotted other errors hereabouts - probably needs more thorough review. Hugh --- mmotm/drivers/thermal/thermal_sys.c 2012-09-26 10:15:28.652071362 -0700 +++ linux/drivers/thermal/thermal_sys.c 2012-09-26 11:41:01.549684983 -0700 @@ -252,8 +252,8 @@ static void bind_cdev(struct thermal_coo } tzp = pos->tzp; - if (!tzp->tbp) - return; + if (!tzp || !tzp->tbp) + break; for (i = 0; i < tzp->num_tbps; i++) { if (tzp->tbp[i].cdev || !tzp->tbp[i].match)