Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6756858pxv; Fri, 30 Jul 2021 01:22:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxeaCSjkmT9H6Z7nqWdt9BOgWyCUOp4nBzy5Ug4YZCCEc+vFK70CA9ybiBomzo16l6rPzQ X-Received: by 2002:a05:6402:3492:: with SMTP id v18mr1623071edc.299.1627633356946; Fri, 30 Jul 2021 01:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627633356; cv=none; d=google.com; s=arc-20160816; b=NcpuNeCcP602uOLMUPe93IP7LcDzULw60WlZs+6FEPus4bqUwUoh2APo/eKEoS7ieb YkAgaxJye3hM+VTpjKd4EavkUFSPSC7d1LtcDd0TPgL9Oa+Kb3iYclpk0FDBw5wk5hDC OCWQp+Kh1Rq8MkeiREhENGaDt2QTCz7iPZpyEgULQwjgW255ud+2NmBWlkq0ZBPMkX88 9YhJL+WxulFPMfypZ3x67bVU2uNfXEifNWCd4z/ARZzXdZtPve4/k+h7ncAPzgvKktIE KzNoZA67ckG6+FfTsQUJHCscUy+SMNt4ybqPtxZ7P8KvxvMQZaVkYP5WxZO3PXVCmw7G kB1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:sender:subject:cc:to:from:dkim-signature :dkim-filter; bh=vlgwYjhsUzUKACptFyNyB+NiqP+0vvSB/lF9vp142Kk=; b=GBDFULdhtEZOKuFnaLueT8Pgrw3Q3SuacH6cwwqvF/ieR9FcpCCqCGH+NekEkJn+a1 Tw3xK2xhDVOlr37TuvH1IzdLntSJ3gI3iHv0dqPriNAc20N7e1nUv3veDYe1dqMNzQrF oAsa9Mdvd8VbtFeFti9QxwECNMUW6miHXF4YG6d315eTKv97pA78tFhZupWeyttZ8qNX r/ASRS8gNwA/uGnGFmtad8g7n2nj35aNDeGWfuqkf81iw3UxeWCsC26nT1Im9x8Vl49B 19XO3xSqz0/t5++z/7NWej3ypjBrSRw//KRLY+/0Fz2RkhCCiTh4Xr7K+8UjzjLfX4f5 zh2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=Sjc5DN22; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k16si976544edv.498.2021.07.30.01.22.12; Fri, 30 Jul 2021 01:22:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@piap.pl header.s=mail header.b=Sjc5DN22; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=piap.pl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231939AbhG3ISv (ORCPT + 99 others); Fri, 30 Jul 2021 04:18:51 -0400 Received: from ni.piap.pl ([195.187.100.5]:47718 "EHLO ni.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231411AbhG3ISu (ORCPT ); Fri, 30 Jul 2021 04:18:50 -0400 Received: from t19.piap.pl (OSB1819.piap.pl [10.0.9.19]) by ni.piap.pl (Postfix) with ESMTPSA id 7B72DC39A780; Fri, 30 Jul 2021 10:18:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 ni.piap.pl 7B72DC39A780 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=piap.pl; s=mail; t=1627633124; bh=vlgwYjhsUzUKACptFyNyB+NiqP+0vvSB/lF9vp142Kk=; h=From:To:Cc:Subject:Date:From; b=Sjc5DN22IYJ7QoN7q7Q8tI17P1WeLFfGTNTlpYw0CCVte4RIgoSvsWYL9x9Un6S4z r5+7XpipzyFvVc5rkH7+yVwN1LU7H3jR7mU389Ko06Ywl336XvlrgtxS3v+ARBhLyv 0xlNnhSnziQO6UCMrVHqHsfardnKuHf7Wf4XEqaU= From: =?utf-8?Q?Krzysztof_Ha=C5=82asa?= To: =?utf-8?Q?Pali_Roh=C3=A1r?= Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Lorenzo Pieralisi , Gregory Clement , Andrew Lunn , =?utf-8?Q?Kr?= =?utf-8?Q?zysztof_Wilczy=C5=84ski?= Subject: PCI: Race condition in pci_create_sysfs_dev_files (can't boot) Sender: khalasa@piap.pl Date: Fri, 30 Jul 2021 10:18:44 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-KLMS-Rule-ID: 1 X-KLMS-Message-Action: clean X-KLMS-AntiSpam-Lua-Profiles: 165318 [Jul 30 2021] X-KLMS-AntiSpam-Version: 5.9.20.0 X-KLMS-AntiSpam-Envelope-From: khalasa@piap.pl X-KLMS-AntiSpam-Rate: 0 X-KLMS-AntiSpam-Status: not_detected X-KLMS-AntiSpam-Method: none X-KLMS-AntiSpam-Auth: dkim=pass header.d=piap.pl X-KLMS-AntiSpam-Info: LuaCore: 449 449 5db59deca4a4f5e6ea34a93b13bc730e229092f4, {Tracking_uf_ne_domains}, {Tracking_marketers, three}, {Tracking_from_domain_doesnt_match_to}, t19.piap.pl:7.1.1;piap.pl:7.1.1;lkml.org:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2 X-MS-Exchange-Organization-SCL: -1 X-KLMS-AntiSpam-Interceptor-Info: scan successful X-KLMS-AntiPhishing: Clean, bases: 2021/07/30 06:56:00 X-KLMS-AntiVirus: Kaspersky Security for Linux Mail Server, version 8.0.3.30, bases: 2021/07/30 04:15:00 #16998356 X-KLMS-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pali, et al, I'm encountering a problem booting an i.MX6-based device (Gateworks Ventana SBC). This is apparently a known issue: https://lkml.org/lkml/2020/7/16/388 Do you guys know of a fix for this? Booting this machine reliably is lately impossible. First, it spews a warning: pcieport 0000:00:00.0: PME: Signaling with IRQ 310 sysfs: cannot create duplicate filename '/devices/platform/soc/1ffc000.pcie= /pci0000:00/0000:00:00.0/0000:e0' CPU: 2 PID: 7 Comm: kworker/u8:0 Not tainted 5.14.0-rc3+ #40 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events_unbound async_run_entry_fn unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x40/0x4c dump_stack_lvl from sysfs_warn_dup+0x54/0x60 sysfs_warn_dup from sysfs_add_file_mode_ns+0x154/0x1a8 sysfs_add_file_mode_ns from sysfs_create_bin_file+0x60/0x8c sysfs_create_bin_file from pci_create_resource_files+0xf4/0x140 pci_create_resource_files from pci_bus_add_device+0x20/0x8c pci_bus_add_device from pci_bus_add_devices+0x3c/0x80 pci_bus_add_devices from pci_bus_add_devices+0x70/0x80 pci_bus_add_devices from pci_host_probe+0x3c/0x90 pci_host_probe from dw_pcie_host_init+0x200/0x4b4 dw_pcie_host_init from imx6_pcie_probe+0x338/0x668 imx6_pcie_probe from platform_probe+0x80/0xc0 platform_probe from really_probe+0x158/0x324 really_probe from __driver_probe_device+0x84/0xe4 __driver_probe_device from driver_probe_device+0x34/0xd0 driver_probe_device from __driver_attach_async_helper+0x20/0x38 __driver_attach_async_helper from async_run_entry_fn+0x24/0xb4 async_run_entry_fn from process_one_work+0x164/0x3b0 process_one_work from worker_thread+0x2c/0x52c worker_thread from kthread+0x110/0x154 kthread from ret_from_fork+0x14/0x24 pcieport 0000:01:00.0: enabling device (0140 -> 0143) Then: Unable to handle kernel paging request at virtual address 6f736572 (ASCII = =3D "reso") pgd =3D (ptrval) [6f736572] *pgd=3D00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 2 PID: 7 Comm: kworker/u8:0 Not tainted 5.14.0-rc3+ #40 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events_unbound async_run_entry_fn PC is at string_nocheck+0x20/0xa0 LR is at string+0x54/0x64 Process kworker/u8:0 (pid: 7, stack limit =3D 0x(ptrval)) string_nocheck from string+0x54/0x64 string from vsnprintf+0x1c4/0x48c vsnprintf from vprintk_store+0x80/0x33c vprintk_store from vprintk_emit+0x6c/0x1e0 vprintk_emit from vprintk_default+0x20/0x28 vprintk_default from printk+0x1c/0x2c printk from sysfs_warn_dup+0x50/0x60 sysfs_warn_dup from sysfs_add_file_mode_ns+0x154/0x1a8 sysfs_add_file_mode_ns from sysfs_create_bin_file+0x60/0x8c sysfs_create_bin_file from pci_create_resource_files+0xf4/0x140 pci_create_resource_files from pci_bus_add_device+0x20/0x8c pci_bus_add_device from pci_bus_add_devices+0x3c/0x80 pci_bus_add_devices from pci_bus_add_devices+0x70/0x80 pci_bus_add_devices from pci_host_probe+0x3c/0x90 pci_host_probe from dw_pcie_host_init+0x200/0x4b4 dw_pcie_host_init from imx6_pcie_probe+0x338/0x668 imx6_pcie_probe from platform_probe+0x80/0xc0 platform_probe from really_probe+0x158/0x324 really_probe from __driver_probe_device+0x84/0xe4 __driver_probe_device from driver_probe_device+0x34/0xd0 driver_probe_device from __driver_attach_async_helper+0x20/0x38 __driver_attach_async_helper from async_run_entry_fn+0x24/0xb4 async_run_entry_fn from process_one_work+0x164/0x3b0 process_one_work from worker_thread+0x2c/0x52c worker_thread from kthread+0x110/0x154 kthread from ret_from_fork+0x14/0x24 Code: e1dd42b2 e58d301c e3540000 0a000019 (e5d2e000) -- Krzysztof "Chris" Ha=C5=82asa Sie=C4=87 Badawcza =C5=81ukasiewicz Przemys=C5=82owy Instytut Automatyki i Pomiar=C3=B3w PIAP Al. Jerozolimskie 202, 02-486 Warszawa