From nobody Sun Feb 8 02:08:38 2026 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FC3E22FE0A for ; Sun, 26 Oct 2025 04:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761453849; cv=none; b=lkU+ixJjKbP/AS53ac3/uDKCGRqTHoktZqRQy0kyTvPXab4dd1kZ2O2PqQq//Sc0U7x32AF6/shnP5SaS7T2T1v1yU+filFiGpT0d2jlh5FoIvAnYKgylEuEY2tE+1ROL4ptFxl3YKWvmSbyJswzpXaTguYVben3GxmoRM2yC64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761453849; c=relaxed/simple; bh=sAHI5iIZM5NABgTl/sQiPfhdR+xFRe//xBPBZe5FW6Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tO31ZwfsGRU76Qvcr0GMZ0kcRgh3arOnRDJ0cXLlVQkNISqbIVZEoP7bdiWWI4nESsATcbiocvxU+q6uqT9z/6q/oHAeM/9JYlZUfzr1PgvVFz4rOHpVVkGt+61HoqSGD/O9MeBOmxfMtGOvrp+RP8WmU/WhsBtN/9BiEMP6EKQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CJ53fAxG; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CJ53fAxG" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-b556284db11so2913359a12.0 for ; Sat, 25 Oct 2025 21:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761453847; x=1762058647; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Xk1/Yc6Z7SPwqUmBl+xKHBmZ07J03/Mj+lkIe6IoAeo=; b=CJ53fAxGg3cCsgFYtnnxWHIy4D2wgBb8mcunh16Cv7IXJ88mMamdCC9m02eP9Va4e5 vR0Yo5aSPzcOEMgAN+NWRzyf57NzwBGIicGtXDaBZAinvf6is4kNa6RFQsHiAwdRji8f 68fuIj6ZmyUFZjsIwsETT98b580LRZ82D2bFswJd94ZjCQAVM1MdSf02uNd+Z2gXRmnS G3GhG0GTwkTnkNXgjGqYMG5tKySBdl8dKg+kPA9Ifua9g7pmYGJ6Om3TqCuH82noAPKb iElDqpGaFR5HrYPvY7tF70avJSEkUuZdnDcgoArn9NclDzgU8u48herM6M7ZYmzIvx5G mfNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761453847; x=1762058647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Xk1/Yc6Z7SPwqUmBl+xKHBmZ07J03/Mj+lkIe6IoAeo=; b=kqx9Z1GRlgNuoVgzaZbC0H0HJfogP4+i6qtw8Gk5hKTaaSinr87qKZnY+LOby4oe7a BeLYpEZ0BM7Dw+KVhOU0J3cioCpn3DkP/Cbcwdu4b/7jUV9b37EnIOmVtRbq5fUPq/Kq xaBUR65DDCYt6p6j3EnW2XOQjySUmMzNzKdKZyMDe1riy6aJ8YnPrB6TW64soaoRK2NI Q1LGuQNhLSfRHNs/daKjwYqiVeHOWMZUPrV8wIbKjpy2XG/IYegfmVMtZ1Kc170j3SCj SOzHzR7R6prhTyRtxg7YAQK6erUM8aTqJsRHKcQ2VEfsVbM0QgB1+Zh1alIP8/ehR+Tn q5Vw== X-Forwarded-Encrypted: i=1; AJvYcCViqkFFbbePynHdF4t1o7Pgr+pakrXMXUPbldCbNJhEpxJwYtJdw23U3DYFBN3Tn8pC1c4kXBtzpya3+Lk=@vger.kernel.org X-Gm-Message-State: AOJu0YwNdj9W3DZj86PRb1LEGjRl4qISiy7653PkDMLGUR3gv68iN/i+ xbcRMw+RcQ6d8SsLFcAt8fspk3pa80c4mLKNModDr3gFsQIY2rx848pI X-Gm-Gg: ASbGncuvGZeiLs96ruJvr8ZvJp7vy5hF7HQgZF/XUrjwGLOyDu773kIsdSjmCIRgwzr JxQhqyrrhrM4G8AVNCUbnZsxLZ5m829ODy2lYaQ5LEOV+Z9MFCWIxkK7rcqyiMwgi4PrR1eJrdH dkUjW58o673waCXjG72zlNgPbU2BuIOsKSwVoq1xaeBHLfHZvu6gb18ofRhJ2lYSZ6tbnwDDa7p Nc/k4/atxQEnZucEQ1Bpt5kz3683zC1IMFPNHX148wm9Z0oEvhh/764hesACAd1lzyMS3vvA/SN /+V7LRk5PULnBDK99faJzYn8Rb1EARI7uV6h28kStkvPWAGqDRvrC4vBrHQ+K5aKJzcY9EkBxjO WZEiAQV6We5rkrEKYteSq2l8lFxCEIqVbjKtBHmFJWWKw5eybVNPi5kQP4J4kheiZuLVFMN8dhO AaoIZngIEpCeDpvwHRXm09xqeam1tVH89321kaGwvp65yrTLs+Gg== X-Google-Smtp-Source: AGHT+IHc8dm0fiYDLt8rU8qfupJlNJN9BRtqR20SQ0bZw140gD/aS1oyiyBfrB9MNCNRXcTWNyoazg== X-Received: by 2002:a17:902:f68c:b0:25c:d4b6:f119 with SMTP id d9443c01a7336-290c9c89ce1mr445488005ad.12.1761453846681; Sat, 25 Oct 2025 21:44:06 -0700 (PDT) Received: from localhost.localdomain ([119.127.199.177]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29498d2317csm39315755ad.48.2025.10.25.21.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Oct 2025 21:44:06 -0700 (PDT) From: Guangbo Cui To: Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Thomas Gleixner , Bjorn Helgaas Cc: Jonathan Cameron , Waiman Long , linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Guangbo Cui Subject: [PATCH v3 1/2] PCI/aer_inject: Convert inject_lock to raw_spinlock_t Date: Sun, 26 Oct 2025 04:43:34 +0000 Message-ID: <20251026044335.19049-3-jckeep.cuiguangbo@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251026044335.19049-2-jckeep.cuiguangbo@gmail.com> References: <20251026044335.19049-2-jckeep.cuiguangbo@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The AER injection path may run in forced-threaded interrupt context under PREEMPT_RT while holding the lock with IRQs disabled. On RT kernels, spinlocks are converted into rt_spinlocks, which may sleep. Sleeping is not permitted in IRQ-off sections, so this may trigger lockdep warnings such as "Invalid wait context" in [1]. raw_spin_lock_irqsave(&pci_lock); =E2=86=93 rt_spin_lock(&inject_lock); <-- not allowed Switching inject_lock to raw_spinlock_t preserves non-sleeping locking semantics and avoids the warning when running with PREEMPT_RT enabled. The list protected by this lock is bounded and only used for debugging purposes, so using a raw spinlock will not cause unbounded latencies. [1] https://lore.kernel.org/all/20251009150651.93618-1-jckeep.cuiguangbo@gm= ail.com/ Acked-by: Waiman Long Signed-off-by: Guangbo Cui --- drivers/pci/pcie/aer_inject.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c index 91acc7b17f68..c8d65bfb10ff 100644 --- a/drivers/pci/pcie/aer_inject.c +++ b/drivers/pci/pcie/aer_inject.c @@ -72,7 +72,7 @@ static LIST_HEAD(einjected); static LIST_HEAD(pci_bus_ops_list); =20 /* Protect einjected and pci_bus_ops_list */ -static DEFINE_SPINLOCK(inject_lock); +static DEFINE_RAW_SPINLOCK(inject_lock); =20 static void aer_error_init(struct aer_error *err, u32 domain, unsigned int bus, unsigned int devfn, @@ -126,12 +126,12 @@ static struct pci_bus_ops *pci_bus_ops_pop(void) unsigned long flags; struct pci_bus_ops *bus_ops; =20 - spin_lock_irqsave(&inject_lock, flags); + raw_spin_lock_irqsave(&inject_lock, flags); bus_ops =3D list_first_entry_or_null(&pci_bus_ops_list, struct pci_bus_ops, list); if (bus_ops) list_del(&bus_ops->list); - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); return bus_ops; } =20 @@ -223,7 +223,7 @@ static int aer_inj_read_config(struct pci_bus *bus, uns= igned int devfn, int domain; int rv; =20 - spin_lock_irqsave(&inject_lock, flags); + raw_spin_lock_irqsave(&inject_lock, flags); if (size !=3D sizeof(u32)) goto out; domain =3D pci_domain_nr(bus); @@ -236,12 +236,12 @@ static int aer_inj_read_config(struct pci_bus *bus, u= nsigned int devfn, sim =3D find_pci_config_dword(err, where, NULL); if (sim) { *val =3D *sim; - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); return 0; } out: rv =3D aer_inj_read(bus, devfn, where, size, val); - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); return rv; } =20 @@ -255,7 +255,7 @@ static int aer_inj_write_config(struct pci_bus *bus, un= signed int devfn, int domain; int rv; =20 - spin_lock_irqsave(&inject_lock, flags); + raw_spin_lock_irqsave(&inject_lock, flags); if (size !=3D sizeof(u32)) goto out; domain =3D pci_domain_nr(bus); @@ -271,12 +271,12 @@ static int aer_inj_write_config(struct pci_bus *bus, = unsigned int devfn, *sim ^=3D val; else *sim =3D val; - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); return 0; } out: rv =3D aer_inj_write(bus, devfn, where, size, val); - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); return rv; } =20 @@ -304,14 +304,14 @@ static int pci_bus_set_aer_ops(struct pci_bus *bus) if (!bus_ops) return -ENOMEM; ops =3D pci_bus_set_ops(bus, &aer_inj_pci_ops); - spin_lock_irqsave(&inject_lock, flags); + raw_spin_lock_irqsave(&inject_lock, flags); if (ops =3D=3D &aer_inj_pci_ops) goto out; pci_bus_ops_init(bus_ops, bus, ops); list_add(&bus_ops->list, &pci_bus_ops_list); bus_ops =3D NULL; out: - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); kfree(bus_ops); return 0; } @@ -383,7 +383,7 @@ static int aer_inject(struct aer_error_inj *einj) uncor_mask); } =20 - spin_lock_irqsave(&inject_lock, flags); + raw_spin_lock_irqsave(&inject_lock, flags); =20 err =3D __find_aer_error_by_dev(dev); if (!err) { @@ -404,14 +404,14 @@ static int aer_inject(struct aer_error_inj *einj) !(einj->cor_status & ~cor_mask)) { ret =3D -EINVAL; pci_warn(dev, "The correctable error(s) is masked by device\n"); - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); goto out_put; } if (!aer_mask_override && einj->uncor_status && !(einj->uncor_status & ~uncor_mask)) { ret =3D -EINVAL; pci_warn(dev, "The uncorrectable error(s) is masked by device\n"); - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); goto out_put; } =20 @@ -445,7 +445,7 @@ static int aer_inject(struct aer_error_inj *einj) rperr->source_id &=3D 0x0000ffff; rperr->source_id |=3D PCI_DEVID(einj->bus, devfn) << 16; } - spin_unlock_irqrestore(&inject_lock, flags); + raw_spin_unlock_irqrestore(&inject_lock, flags); =20 if (aer_mask_override) { pci_write_config_dword(dev, pos_cap_err + PCI_ERR_COR_MASK, --=20 2.43.0 From nobody Sun Feb 8 02:08:38 2026 Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36F31262FCB for ; Sun, 26 Oct 2025 04:44:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761453854; cv=none; b=o8KNHr9RJnKVkHGbiF95lsLmX+RXoT1WHdp8lwZUT8lrSfKRueqgsuN2dbxgN870Ndyd+rP0O7QcVa8Vgc7HnsUHjCXmgFECTQfW43hgDGFbvR0EsYm2YFuzx1ZrN3uILk9VczvJqEPdfzuZH8+qaRAveW8uF6WOu3UvIEOZM/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761453854; c=relaxed/simple; bh=w4Q+yHhJBasAdeSXBOcO67FD8hR5fmC9dO9uLZoDllg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cl5h2VJYlcblGKA6kK2bZ+q1UUTJ9vVfgQ1ACBtsGJS2c/5Sk5IYcYq30kBOIp6UdVWpW4oml1lQzBF5fq2K3KpHfcJtypzvIiZh7GnPI0/0axYpvDjcUAGmJgtraU9c6at1BBG66lx23v4hwfhjhjVd25uotOB4ofTVsVuDUYs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=IvTBLq4d; arc=none smtp.client-ip=209.85.215.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IvTBLq4d" Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-b6329b6e3b0so3785558a12.1 for ; Sat, 25 Oct 2025 21:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761453852; x=1762058652; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MX0ni6H4pbjiWrv/AnHeK1axe/PVUJRTQ2U0GTGwYuk=; b=IvTBLq4djabjUfXBykrwlBeQWgEupiQzR/GgeVIx0y8nBaXI525RrJwN9f0/V4jIte jHHK56ACso13tnNQK17eQAM55c1KgIQdoQI2HrCx62j6AM3Yw0bn0QoNQCN/mtJpMOT0 zUcHog+/5bJH/HM4XpvzUAqVFblMn6RpyevZ4sXKU1fYyOh5TM2D+WFwjGNVcGtoI7Tc +FW3uRxIZMPn/5ELL8GfUZzcQt3V3DH/X1uii1/PcXay4LmoOmjGtLFqhSPU5gDgs0KT mbn836jNDeT6vq4J3WbKimnAGxQGOPDNmDQvzrIYKKm+R5cEdfBYaKISNKT57NC4J1fF LDEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761453852; x=1762058652; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MX0ni6H4pbjiWrv/AnHeK1axe/PVUJRTQ2U0GTGwYuk=; b=M30ClH37umGvnCnwfkBEos8c1psT0thcplBOPmc6eJuxHn95exzGng6P7+Nx8ef7TU TzMDhvtaxECGW7N6T9pU7MMtsIDGgZAC7CR9BNg1Stpus0bFtYEzBX7YP5CaC6SfYOqb xL7WEYLMxVrG4VKcm0/XlwykytkPa3SCsbIXBJyg4cd+hct5GiTK4vVhnHLWfWYPWCdt w3tyKqtJmC6ysYjLxr7f8OohZbxaR94aAVG0ZIPj7Eo+INkRkVTpxBQ12pQgvUi1amoo IncvutiJYP5lGbRTq6jRMQtu4l6FSgnq3E5vz+482jEmmuE8GTI7XGp0WTJy/LXeVKkQ SCZA== X-Forwarded-Encrypted: i=1; AJvYcCX3+BB2NkQahx3IbC9LMAxBjPaf3r8nfYL1gPXY+idQjl992KYeIUOaa0UCbPn4zGpyAQYEA0skNqv/ZZI=@vger.kernel.org X-Gm-Message-State: AOJu0YznqHNpPDVMUOfcJgkSxjCmVduZQz/p+n+FtvyjxbiG3NCnf3Vv RroMNLXtXRF0T1SkIfBz7++exzclbDrGfbSSGqIzvIp2mwqzOgWTLHBd X-Gm-Gg: ASbGncsjl3+5bMmmXlQrSRtOBD6aA2ty7sQQ0NQcf4dseZBMSYwxNtIKsGHtGWqAyBW oWREPKPZenW+hXzqRFXGouheXuP4xPyh7e/h+cBPVZ2MVoBJL4183nFJr6CTEyIL5hneWje8wvv bSfSfKJKhqa0eDsXaPh/NAGzVfCQRrQocAf6b+SQK21JA8HmC2SSIB8V/gxKSPpljlKHGThI5pP S/jZn9SieyyBoGab/nsUXF/kp1qJz37uFT3F11WMYeSvL0QS9ClnJuzJEYtbmEWKHaCQJ1rGbdO Gi4DihbZ1JWbU9/JeWUTo5xOiDYKPj5xXGIFd7bDEk3M5MPDnJKVufYOOdpxhN53717SZjPGO50 mVoZoTzfuxAS1JpUBcLH3Bh0BdEaDOwjn17a4KeEpHoBnp3AWI4vaXAK+aXfF142cPaN9K9z7Vq rh4UanJ6dySUoGrKqdYWgsBQs4SJPqOGqv4jCUPuP9knDSAC6pAg== X-Google-Smtp-Source: AGHT+IFUy9nDaJV51/d03ANfLAhw0sYIOgZYfK93VgsR+kv1D2t1kjboFjQQXoUpP81vgHZLi1rddQ== X-Received: by 2002:a17:903:187:b0:27d:6cb6:f7c2 with SMTP id d9443c01a7336-29489e050e4mr101688115ad.17.1761453852259; Sat, 25 Oct 2025 21:44:12 -0700 (PDT) Received: from localhost.localdomain ([119.127.199.177]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29498d2317csm39315755ad.48.2025.10.25.21.44.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Oct 2025 21:44:12 -0700 (PDT) From: Guangbo Cui To: Sebastian Andrzej Siewior , Clark Williams , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Will Deacon , Boqun Feng , Thomas Gleixner , Bjorn Helgaas Cc: Jonathan Cameron , Waiman Long , linux-rt-devel@lists.linux.dev, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Guangbo Cui Subject: [PATCH v3 2/2] PCI/aer_inject: Remove unnecessary lock in aer_inject_exit Date: Sun, 26 Oct 2025 04:43:35 +0000 Message-ID: <20251026044335.19049-4-jckeep.cuiguangbo@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251026044335.19049-2-jckeep.cuiguangbo@gmail.com> References: <20251026044335.19049-2-jckeep.cuiguangbo@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After misc_deregister and restoring PCI bus ops, there can be no further users accessing the einjected list. The list items are therefore safely freed without taking the lock. Signed-off-by: Guangbo Cui Reviewed-by: Sebastian Andrzej Siewior --- drivers/pci/pcie/aer_inject.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pci/pcie/aer_inject.c b/drivers/pci/pcie/aer_inject.c index c8d65bfb10ff..a064fa2acb94 100644 --- a/drivers/pci/pcie/aer_inject.c +++ b/drivers/pci/pcie/aer_inject.c @@ -523,7 +523,6 @@ static int __init aer_inject_init(void) static void __exit aer_inject_exit(void) { struct aer_error *err, *err_next; - unsigned long flags; struct pci_bus_ops *bus_ops; =20 misc_deregister(&aer_inject_device); @@ -533,12 +532,10 @@ static void __exit aer_inject_exit(void) kfree(bus_ops); } =20 - spin_lock_irqsave(&inject_lock, flags); list_for_each_entry_safe(err, err_next, &einjected, list) { list_del(&err->list); kfree(err); } - spin_unlock_irqrestore(&inject_lock, flags); } =20 module_init(aer_inject_init); --=20 2.43.0