Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp198162lqb; Tue, 4 Jun 2024 08:49:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVtf2pidPdTvLHi0mV2rG3NeSCLcGMvXBVVvWK4+fjmx4VNzz6DKm02A2lSuNFLRX5a7uQgL6sM+aDU5wXI1LWo2hnTN1pqIsZa7lkkrA== X-Google-Smtp-Source: AGHT+IHiYeL/PbBuVqc67VMrmFphhb2PUFDeQQEGBmR//vR1ccuwOpLVCsCqpAoKrM3qlax2VIY7 X-Received: by 2002:a17:907:11cf:b0:a69:1a9f:7985 with SMTP id a640c23a62f3a-a691a9f7a2fmr299913666b.77.1717516189290; Tue, 04 Jun 2024 08:49:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717516189; cv=pass; d=google.com; s=arc-20160816; b=ysvfVObuPdj3bnfQKiu4GyGiJe3a2OActxxHZDe3qBvFda0Sui529sF7S3GtaWuuFh +BNvKRq2kHLBhFM7XO55i4aLsgizvJsoRD6ZOPqdeJ6TDGwItaMbP6hESga4vxsptwll uWng5TI4v/eJP1UiLG72X5MM8x8pUq1Jn3UBL35xpliYYhERoATe2As9qmdUvwoDF4dV DORV3NE7zpGsNQwopA9WLhT77vSF3zt5uNfnDbYmZJr84RB4+aEUwKoeTNIGjWxkQOf4 aMfO2NpxwJVuZrAKhQAhifGFjJkYiTaDw5gc9PSlWvSvTG5mYsk5zAmhdGkgRn1XaFv8 Qglg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=vuTdCrllhjiwqCQ1Qziy2BlocOpLccapeyS65kK6rT4=; fh=EZKmK2ykhhxsK1QgK7FDvX/RLnUrWf0PNhBPw5Q9JZ0=; b=ufSdrAZxuIZVcKFqL87ig7kWLZPS5LSdP6W0bKG74D3dEzRx75E5UurRluog1I14qY ATUqIpdJHcB6QPfM8MX5LovN/Qt4daK372qyVgYTPiHegBTFfOTtx4aaQMAH+fYJQpY3 cksQT+9uk0+ayTGIFcZFigXgm9V8q1/mYASG8cDHeu/phdebbBWRR/tVN+KFkU47b0XH HcubFrY2F9krn0CTLeq42oPiTte0YzgZAD4vPkc6mPV5Pg/o6AGDDTvWYTGu+lQwP8ih fAo3SA+VNfoA0QoeDF6/mYTJv+9pBLSpCxNwUiQK5y94zE9swDgFb/vp3FuAk3Evtl3v 2rkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jl02ARun; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-200996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a68bdf17bcdsi354514966b.331.2024.06.04.08.49.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 08:49:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jl02ARun; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-200996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0729C1F20DD4 for ; Tue, 4 Jun 2024 15:49:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C21241474BC; Tue, 4 Jun 2024 15:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jl02ARun" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7676A50A6D; Tue, 4 Jun 2024 15:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717515927; cv=none; b=Ku8/pKhgMxDwb6y5h7wLR2AMByvPyGfLpLkGjqYAyGlt8e9gckeq3Phvp8COpBBfyfTPAU0t8m+UWyhpUf44X1oW3rhDJ2h9maiMn/cx0Jbu2KaNC33wE//MlYAHSZfW4S0nKwHFo4g7xUBgF+Ke+1yM7HRPTnDKDHM/INyt/OU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717515927; c=relaxed/simple; bh=fxhufSj1kMUMH8lKvvr/CVA0StD+PGE7fnR3oK/5h8s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ivth4cfC7ruO8kYTnE3A4+ZYBrQ6rJqoTo3p6G+M1J8qMQUMgZJrQWu66sPgUjdIUrbUkmIxhd2ETG3O+N2lCXJvCdu7Xc3qfSS46/Id1wuK58KylQ6t8gyIL9RCEfRIkORFH6MdvYndsnVa/1a1hVMQbDOcuDL5IiXbPt2eojc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jl02ARun; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717515926; x=1749051926; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=fxhufSj1kMUMH8lKvvr/CVA0StD+PGE7fnR3oK/5h8s=; b=jl02ARunw6bSXMeehE8arEYWrNRDjacWMaq6X15RXj24BNLV/5kXGHnX SGKbHHQfP6z3GBL/1CgwgKotOzefEeyWBC2lMEgG3qr/6o/fjrg/OciLl CqXYr75LKBQxkcbQPOlYMd7zhJRA3AoZkQoW5YGYVFDZ1aA1KFOcgGb3a lVqQs0+nG0WKFxZp9zcPPf2KfM+Yojsp0Nqhr+cuWXzE9xA0aTK+2IklG SPMPJs5GwB3nUf3IkjsVBmEp5XmpM5UKLNLUdqlIZzuBLDSesrpVGjn3m 2tDwZ2xhFgiLJnwZrxoCWrK+MOAWR9o0BaQnKMBu9oaD+nWe2QIRpSCXw A==; X-CSE-ConnectionGUID: 2He3MRpISvmlopd40SQTNA== X-CSE-MsgGUID: zujNSxsVRkaHR4FlYEXBxA== X-IronPort-AV: E=McAfee;i="6600,9927,11093"; a="25186329" X-IronPort-AV: E=Sophos;i="6.08,214,1712646000"; d="scan'208";a="25186329" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 08:45:25 -0700 X-CSE-ConnectionGUID: VTXMJTn+TjeA9zQFUPRCKA== X-CSE-MsgGUID: 0hBBlcbISreYSez/xGyHCQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,214,1712646000"; d="scan'208";a="42390458" Received: from ideak-desk.fi.intel.com ([10.237.72.78]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2024 08:45:21 -0700 Date: Tue, 4 Jun 2024 18:45:28 +0300 From: Imre Deak To: Dan Williams Cc: Leon Romanovsky , Tejun Heo , Dave Jiang , Lai Jiangshan , Zqiang , Gal Pressman , Tariq Toukan , RDMA mailing list , Hillf Danton , linux-kernel@vger.kernel.org Subject: Re: [PATCH -rc] workqueue: Reimplement UAF fix to avoid lockdep worning Message-ID: Reply-To: imre.deak@intel.com References: <4c4f1fb769a609a61010cb6d884ab2841ef716d3.1716885172.git.leon@kernel.org> <665f30d54276e_4a4e629427@dwillia2-xfh.jf.intel.com.notmuch> 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=us-ascii Content-Disposition: inline In-Reply-To: <665f30d54276e_4a4e629427@dwillia2-xfh.jf.intel.com.notmuch> On Tue, Jun 04, 2024 at 08:20:53AM -0700, Dan Williams wrote: > Imre Deak wrote: > > Hi, > > > > [Sorry for the previous message, resending it now > > with proper In-reply-to: header added.] > > > > I see a similar issue, a corruption in the lock_keys_hash while > > alloc_workqueue()->lockdep_register_key() iterates it, see [1] for the > > stacktrace. > > > > Not sure if related or even will solve [1], but [2] will revert > > > > commit 7e89efc6e9e4 ("PCI: Lock upstream bridge for pci_reset_function()") > > > > which does > > > > lockdep_register_key(&dev->cfg_access_key); > > > > in pci_device_add() and doesn't unregister the key when the pci device is > > removed (and potentially freed); so basically 7e89efc6e9e4 was missing a > > > > lockdep_unregister_key(); > > > > in pci_destroy_dev(). > > > > Based on the above I wonder if 7e89efc6e9e4 could also lead to the > > corruption of lock_keys_hash after a pci device is removed.o > > Are you running with the revert applied and still seeing issues? The revert is not yet applied and so [1] happened with a kernel containing 7e89efc6e9e4. [1] https://intel-gfx-ci.01.org/tree/drm-tip/IGT_7875/bat-atsm-1/dmesg0.txt