From mboxrd@z Thu Jan 1 00:00:00 1970 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 089997081E for ; Thu, 26 Jun 2025 15:42:00 +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=1750952521; cv=none; b=O9/TBKHU9PQ54COdzDplvUSmvbqG1chr1YILfJYD01DqDKNzSS0lJZ7tZEdNtkafSKokdVH2TKSnnGejin7CR2xbV6mYqDrPtAys8mgOZ1DhZDHY1WP25S4evrtXWQVYFGOn0+1EzepPzyKnE8LxD/AIFU9MfIzz4neo++QAQ+4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750952521; c=relaxed/simple; bh=6CdwFCxXo2kN7RDIzZgvCSNe441wFFhUIkA4OlmkGw8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=R2Dwldkgjjkfcsy86u369Wi1aKpEMo+LsVQmSGfwoB214BhAL+7pFg2yNUTE+P4dxFb3oZyeLr0HH8DxvR1rV21WyZktCbmMrrt5AADRMwHBA9G6s9QtvwnruE8GKZJr8fqgDOLDyBM3Nvn0YZa02hCRZLiCMrGwZ0FwkhE2+Ks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QrJ1HCKG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QrJ1HCKG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65A99C4CEEB; Thu, 26 Jun 2025 15:42:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750952520; bh=6CdwFCxXo2kN7RDIzZgvCSNe441wFFhUIkA4OlmkGw8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QrJ1HCKG/1ZWc2UJQCAG3a1Dibphb+SZeGrn9rA/+sKbMTvVtz8Xm+0NJUijtdSPI Af7UbCBzTiBsI8barOse8wnQhooJrIdOKF+OSBuDhaPwSv0mN15v+9Dheh/xeC37H1 ygH4cLgI/Lt91yjUlzT4RqIwIouCZVw34w5/etFksQ6caaDw7rdcFbpgDq8AyCDhWy 44PS8PqLteMY2NlEunqDu/sjC18wXRA+PsG5Wh8pdKU+EGzuGkL65qGImtA5Ae3fPv R8Y4cMz0LS94AnQwNOGQ9qZyV669oOWf6Q5AC3YlG8iNdqE+A/YIVqn2jkankWk7uS Zm5RBQLbsOivg== Date: Thu, 26 Jun 2025 09:41:58 -0600 From: Keith Busch To: Lukas Wunner Cc: "Jozef Matejcik (Nokia)" , "linux-pci@vger.kernel.org" Subject: Re: pci_probe called concurrently in machine with 2 identical PCI devices causing race condition Message-ID: References: Precedence: bulk X-Mailing-List: linux-pci@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 Thu, Jun 26, 2025 at 02:26:56PM +0200, Lukas Wunner wrote: > On Thu, Jun 26, 2025 at 12:20:48PM +0000, Jozef Matejcik (Nokia) wrote: > > However, I think this can happen in any machine with 2 identical > > PCI devices, because as far as I know, existing PCI drivers usually > > do not assume that probe function can be called from multiple threads. > > That can happen all the time and it would be a bug in the driver > if it caused issues. Wait, is that true? I thought that would only happen if the driver indicated probe_type PROBE_PREFER_ASYNCHRONOUS. The default appears to still be the same as PROBE_FORCE_SYNCHRONOUS.