Content-Type: multipart/mixed; boundary="===============0827858815914848992==" MIME-Version: 1.0 From: Fengguang Wu To: lkp@lists.01.org Subject: Re: [perf] BUG: unable to handle kernel NULL pointer dereference at 00000085 Date: Tue, 07 Oct 2014 12:56:33 +0800 Message-ID: <20141007045633.GA17972@wfg-t540p.sh.intel.com> In-Reply-To: <20141004172456.GA7509@worktop.ger.corp.intel.com> List-Id: --===============0827858815914848992== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Peter, On Sat, Oct 04, 2014 at 07:24:56PM +0200, Peter Zijlstra wrote: > On Sat, Oct 04, 2014 at 09:46:22PM +0800, Fengguang Wu wrote: > > Hi Peter, > > = > > 0day kernel testing robot got the below dmesg and the first bad commit = is > > = > > git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core > > = > > commit a54b3e27e27c1bb6d2610eade895c04934c2667e > > Author: Peter Zijlstra > > AuthorDate: Wed Sep 24 13:48:42 2014 +0200 > > Commit: Peter Zijlstra > > CommitDate: Thu Oct 2 23:11:50 2014 +0200 > > = > > perf: improve perf_sample_data struct layout > > = > > This patch reorders fields in the perf_sample_data > > struct in order to minimize the number of cachelines > > touched in perf_sample_data_init(). It also removes > > some intializations which are redundant with the > > code in kernel/events/core.c > > = > > Cc: mingo(a)elte.hu > > Cc: ak(a)linux.intel.com > > Cc: jolsa(a)redhat.com > > Cc: acme(a)redhat.com > > Cc: cebbert.lkml(a)gmail.com > > Cc: peterz(a)infradead.org > > = > > Signed-off-by: Peter Zijlstra (Intel) > > Link: http://lkml.kernel.org/r/1411559322-16548-7-git-send-email-er= anian(a)google.com > > = > = > > [ 267.547006] debug: unmapping init [mem 0xc28f9000-0xc2b03fff] > > [ 267.694378] random: init urandom read with 4 bits of entropy availab= le > > [ 279.465522] sock: process `trinity-main' is using obsolete setsockop= t SO_BSDCOMPAT > > [ 285.269144] BUG: unable to handle kernel NULL pointer dereference at= 00000085 > > [ 285.273002] IP: [] perf_prepare_sample+0x33e/0x496 > > [ 285.276062] *pde =3D 00000000 = > > [ 285.279106] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC > > [ 285.279106] Modules linked in: > > [ 285.279106] CPU: 1 PID: 1583 Comm: trinity-main Not tainted 3.17.0-r= c4-00210-ga54b3e2 #1 > > [ 285.279106] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), B= IOS 1.7.5-20140531_083030-gandalf 04/01/2014 > > [ 285.279106] task: c9475e80 ti: c9670000 task.ti: c9670000 > > [ 285.279106] EIP: 0060:[] EFLAGS: 00010046 CPU: 1 > > [ 285.279106] EIP is at perf_prepare_sample+0x33e/0x496 > > [ 285.279106] EAX: 00000000 EBX: 00000000 ECX: 00000049 EDX: 00000000 > > [ 285.279106] ESI: cfd71c40 EDI: cfd71b84 EBP: cfd71b58 ESP: cfd71b34 > > [ 285.279106] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 > > [ 285.279106] CR0: 80050033 CR2: 00000085 CR3: 095b4000 CR4: 000006d0 > > [ 285.279106] DR0: 41000043 DR1: 00000000 DR2: 00000000 DR3: 00000000 > > [ 285.279106] DR6: ffff0ff0 DR7: 00010602 > = > Could you try the below patch to confirm it works? Yes, it fixes the BUG at perf_prepare_sample(). Tested-by: Fengguang Wu The below table shows the details, in which a5679078d6 =3D a54b3e27e2 + you= r_fix. +-------------------------------------------------------+------------+-----= -------+ | | a54b3e27e2 | a567= 9078d6 | +-------------------------------------------------------+------------+-----= -------+ | boot_successes | 227 | 963 = | | boot_failures | 73 | 37 = | | BUG:kernel_boot_hang | 52 | 13 = | | BUG:unable_to_handle_kernel | 4 | = | | Oops | 4 | = | | EIP_is_at_perf_prepare_sample | 4 | = | | Kernel_panic-not_syncing:Fatal_exception_in_interrupt | 3 | = | | backtrace:iterate_dir | 2 | = | | backtrace:SyS_getdents64 | 2 | = | | WARNING:at_fs/proc/generic.c:remove_proc_entry() | 8 | 18 = | | backtrace:cleanup_net | 8 | 18 = | | backtrace:do_sys_open | 1 | = | | backtrace:SyS_openat | 1 | = | | BUG:kernel_test_crashed | 9 | 4 = | | backtrace:vfs_fstatat | 1 | = | | backtrace:SyS_fstatat64 | 1 | = | | Kernel_panic-not_syncing:Fatal_exception | 1 | = | | BUG:kernel_boot_crashed | 0 | 2 = | +-------------------------------------------------------+------------+-----= -------+ Thanks, Fengguang --===============0827858815914848992==--