Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp331540lqj; Sat, 1 Jun 2024 23:56:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEclS7dspIiWBBlRrbLLq23LTS0bqU4Rze7N7Dmpan6/dU1cST9rWxI0FYw5gLVfw3nyc14BDOur6WT9aMpPVBu3ivnFj2LKu1V095bw== X-Google-Smtp-Source: AGHT+IGpAHfIMfa46m43syXPkoNux2ZnMH4BGhT+1kQT0K6z5DSUMtJLk2f9D8Ly1968WznIc19y X-Received: by 2002:a17:906:8306:b0:a63:41f7:d80f with SMTP id a640c23a62f3a-a6819336061mr552417566b.18.1717311413261; Sat, 01 Jun 2024 23:56:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717311413; cv=pass; d=google.com; s=arc-20160816; b=jwA1oCKfcY1PrYVzkkmo2g/nOskSrPykjOHjeJgbY7hAsYfUh/azfDHUhS8XhAavGW A0lozr+tGK4+RxJ/rlM/GM6f4sRrLv2MbdNU54VeivPi2CtHGQzNr/2nuMsR4LPHUgJx kG8kLgIWxu9c2zT5uAO6Ug02ZGUO38k2ClLku6pXYruDW2OF3vSHlgq7iFsLCdPv3JDQ zfQnYKG5Y2uQMdfzO4aZ4q/9YfqiG2hJvPeY3wydmWIPUT4Fwom1ZDSPdsOwdmXoUiAX xpoPj5wgLdRJ+p+OPR9IOLAAgBuaQ5miEGL0Nrpwnh26V66EESNqnhfzjzL52yCeuRju EZWg== 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:message-id:subject:cc :to:from:date:dkim-signature; bh=DHkyi+ek5lwqjLZqENlCpLb7hmU7hwpD9JqXp/oSRmM=; fh=t2VW2qGc3SasKF4SzccfS9xxYjXxu0783zEPIZwQplI=; b=CXQ46VY1L2WQmffkDA01IDTl8/tBU/3yufpyXDaK+wPx7pCHhQyDQ590eLkcztaLiA GbfYWBJroZx9eRMJHjt5slrX7NYS4EWyBswdiepVjgkXhJ9m/cXzav6r6L+GSDtA2ptm hA+y71Y99QVFJakwHDm4hT2y2Peqp5zCsusqXnE5Tl9mFHVv1WAtwNIugA40XkG78T7C GAMZ9N5wYCwW/FAHDW42khiLeL6I3LrKkhXNSmwq1zDzvw7HY4IKf9j4BUGjRSSH4W96 yQ+peYnb3u+Ri7VYi0uBQuaRMvnN9snkGg271Xlhn6R0BHIHE8yxuiAdsxRn5lot9RCF Bokw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b33G+vHm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198141-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68c815de39si106091466b.428.2024.06.01.23.56.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 23:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198141-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b33G+vHm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-198141-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198141-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 BEADA1F217CC for ; Sun, 2 Jun 2024 06:56:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68F0F171A5; Sun, 2 Jun 2024 06:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b33G+vHm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7FA3118622; Sun, 2 Jun 2024 06:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717311403; cv=none; b=GDLm8QKwHqIByXAkyWiNQxICdtDngEyAMfXjRUeEXb3deFNRb0veYySwb66WT0BRFosj7IS2JFDCkr4Az5vYql0GdXAP3sG+Z51wffl3h65XPRXxjy/0JcQqdcZDp50fOPGfGnbrWmdyahiSLg3VIpRogYYiIonO0GCV9BMkxUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717311403; c=relaxed/simple; bh=m2hTycT7b9I8OtE98CrtrOs2gLvWL0tABdGXhMXVPGc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a+00tH6tSmCSCByj8GSTF5NAmKaOsq7uYkPGo5mXzWpC6yGhMGi05dnHCu3ARR/Al69ToWp91EFQUgcLxpgTwXq+DiC8QGXxtLGo4qH3D2g+QCU+TLF3PapRT50VlqslZ6UQlhWjHp5K1e5lqdo0KlVNTM8FvNhoq2+uP+d36uY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b33G+vHm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86767C2BBFC; Sun, 2 Jun 2024 06:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717311403; bh=m2hTycT7b9I8OtE98CrtrOs2gLvWL0tABdGXhMXVPGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b33G+vHmE24iEodIAibxO1C8u+/3rl3ozdtEuzZ5cRGPU5ecH95gALS7ESjyC8QAf 6Ob+YDE8FPXtxOZBP4veD8WWUDzkHZhyrSrbN2GMQUU9FRWh6XVXmnrY+la8y34ih8 inafnPqJwoXdqpMA/Ybf3qO0OaFJOuekaSLtyJ4biya3EuFY2tSGjlIY9Hn+PMcu04 9qzBdVcHSUZCJAsvPoPtRQRY5K2I4nkk0bMkgWPdwm53l7uYRS04eGXAtfXBbPTtck X0aTwyUnViXciAvD4xBe8TT0gckTmX0ExXAHdF6NO/rVLAj4iw6WZKD0vvU2hwXZcL lYapyvygNt7vQ== Date: Sun, 2 Jun 2024 09:56:38 +0300 From: Leon Romanovsky To: Tejun Heo Cc: Lai Jiangshan , Zqiang , linux-kernel@vger.kernel.org, Gal Pressman , Tariq Toukan , RDMA mailing list Subject: Re: [PATCH -rc] workqueue: Reimplement UAF fix to avoid lockdep worning Message-ID: <20240602065638.GI3884@unreal> References: <4c4f1fb769a609a61010cb6d884ab2841ef716d3.1716885172.git.leon@kernel.org> <20240531034851.GF3884@unreal> 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: On Fri, May 31, 2024 at 07:45:35AM -1000, Tejun Heo wrote: > Hello, > > On Fri, May 31, 2024 at 06:48:51AM +0300, Leon Romanovsky wrote: > > We have similar issues but with different workqueue. > > So, the problem with the proposed patch is that pwq may still be in use by > then (due to async freeing) and thus can't be freed immediately. I still > don't understand why KASAN is triggering there. I tried to repro by > introducing a pwq alloc failure but couldn't. Can you please share the > repro? The repro is part of our CI test, where we run traffic tests and at the end perform "restart driver" stage. At that stage, this lockdep is printed. The test is: 1. Create bond interfaces 2. Run traffic 3. Strop traffic and check that everything is OK 4. Restart driver: modprobe -r -a bonding modprobe -r -a vfio-pci ip_gre ip6_gre bonding geneve ipip ip6_tunnel modprobe -r -a ib_umad ib_ipoib rdma_ucm mlx5_vfio_pci mlx5_ib mlx5_core mlx5-vfio-pci nf_tables Thanks > > Thanks. > > -- > tejun >