From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805AbcHWPMo (ORCPT ); Tue, 23 Aug 2016 11:12:44 -0400 Received: from foss.arm.com ([217.140.101.70]:38065 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbcHWPMm (ORCPT ); Tue, 23 Aug 2016 11:12:42 -0400 Date: Tue, 23 Aug 2016 16:12:42 +0100 From: Will Deacon To: Alexander Shishkin Cc: Vince Weaver , Linux Kernel Mailing List , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo Subject: Re: perf: WARNING: kernel/events/core.c:4893 perf_mmap_close Message-ID: <20160823151239.GA29462@arm.com> References: <87k2fqmska.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexander, On Fri, Aug 12, 2016 at 08:54:49PM +0300, Alexander Shishkin wrote: > Yes, I tracked to a race between unmapping and set_output, trying to > come up with a good fix now. Did you get anywhere with this? I think I just hit the same issue with the intel-pt driver on my broadwell laptop with -rc3+PREEMPT (dump below) and I'm more than happy to test a fix. Will --->8 [ 64.827521] ------------[ cut here ]------------ [ 64.827527] WARNING: CPU: 1 PID: 1762 at /home/kernel/COD/linux/kernel/events/ring_buffer.c:539 __rb_free_aux+0x10c/0x120 [ 64.827528] Modules linked in: fuse binfmt_misc intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp nls_utf8 nls_cp437 kvm_intel iwlwifi vfat kvm fat irqbypass crct10dif_pclmul snd_soc_rt298 dell_laptop crc32_pclmul dell_wmi cfg80211 snd_soc_rt286 dell_led ghash_clmulni_intel dell_smbios dcdbas rtsx_pci_ms snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_soc_rl6347a snd_soc_ssm4567 rfkill memstick snd_soc_core elan_i2c snd_hda_intel aesni_intel snd_compress snd_pcm_dmaengine snd_hda_codec aes_x86_64 lrw snd_hda_core gf128mul glue_helper snd_hwdep ablk_helper cryptd snd_pcm intel_cstate intel_rapl_perf videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 snd_seq_midi videobuf2_core snd_seq_midi_event videodev joydev hid_multitouch efi_pstore media serio_raw snd_rawmidi efivars [ 64.827556] snd_seq sg snd_seq_device snd_timer intel_pch_thermal mei_me snd soundcore mei shpchp lpc_ich battery intel_vbtn sparse_keymap soc_button_array int3403_thermal dw_dmac dw_dmac_core snd_soc_sst_acpi int3400_thermal i2c_designware_platform snd_soc_sst_match acpi_pad acpi_als int3406_thermal int3402_thermal acpi_thermal_rel i2c_designware_core ac evdev kfifo_buf processor_thermal_device int340x_thermal_zone intel_soc_dts_iosf industrialio tpm_tis tpm_tis_core tpm parport_pc ppdev lp parport efivarfs autofs4 ext4 crc16 jbd2 fscrypto mbcache sd_mod usbhid rtsx_pci_sdmmc i915 xhci_pci ehci_pci xhci_hcd ahci ehci_hcd psmouse crc32c_intel libahci usbcore libata i2c_algo_bit drm_kms_helper scsi_mod usb_common drm rtsx_pci mfd_core thermal fan wmi sdhci_acpi sdhci mmc_core video i2c_hid hid fjes [ 64.827587] button [ 64.827589] CPU: 1 PID: 1762 Comm: pt-poker Tainted: G D W 4.8.0-040800rc3-lowlatency #201608212032 [ 64.827590] Hardware name: Dell Inc. XPS 13 9343/0F5KF3, BIOS A07 11/11/2015 [ 64.827592] 0000000000000286 00000000cf433edf ffffffffa7148112 0000000000000000 [ 64.827594] 0000000000000000 ffffffffa6e801fe ffff932a8d941000 ffff932a8f349a80 [ 64.827595] ffff932a8f349800 ffff932a8d940db0 ffff932a8d941000 ffffffffa7a40e00 [ 64.827597] Call Trace: [ 64.827600] [] ? dump_stack+0x5c/0x7a [ 64.827602] [] ? __warn+0xbe/0xe0 [ 64.827604] [] ? __rb_free_aux+0x10c/0x120 [ 64.827606] [] ? perf_mmap_close+0x2c7/0x310 [ 64.827607] [] ? perf_iterate_ctx+0x150/0x150 [ 64.827609] [] ? remove_vma+0x25/0x60 [ 64.827610] [] ? exit_mmap+0xe3/0x150 [ 64.827612] [] ? mmput+0x4a/0xf0 [ 64.827613] [] ? do_exit+0x273/0xb70 [ 64.827614] [] ? do_group_exit+0x3a/0xa0 [ 64.827616] [] ? get_signal+0x27c/0x690 [ 64.827617] [] ? do_signal+0x36/0x6f0 [ 64.827619] [] ? __switch_to+0x2c1/0x810 [ 64.827620] [] ? finish_task_switch+0x71/0x1e0 [ 64.827622] [] ? __schedule+0x264/0x740 [ 64.827624] [] ? exit_to_usermode_loop+0x85/0xc0 [ 64.827626] [] ? prepare_exit_to_usermode+0x21/0x30 [ 64.827627] [] ? retint_user+0x8/0x10 [ 64.827628] ---[ end trace 928bce4cbac61bf3 ]--- [ 64.827643] BUG: scheduling while atomic: pt-poker/1762/0x00000002