Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp239707rdb; Tue, 16 Jan 2024 23:46:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5Pk/9UioiB0DlHpcfxeTWAEuc7scb9VbEeohakyMQMM6da1z//ZZsnmczueXYVjuGslw+ X-Received: by 2002:a05:6830:1e84:b0:6dd:e87b:f241 with SMTP id n4-20020a0568301e8400b006dde87bf241mr6946449otr.46.1705477604563; Tue, 16 Jan 2024 23:46:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705477604; cv=pass; d=google.com; s=arc-20160816; b=vFhpQY3GsFYpgjsNtPZ4TZHYNAUjdplHMxoKjwbB9iaxjTGsGG7w3u8t9s6/SdZZMQ 1y1roE+NyEFAfaG4GiWOBs1oQu151rwWBTQHgb8m1/ZTiPHRPaoOvpUi0KWVPheNPTja Qo8zdLnOlUR6KejYu1PRXP7ZK+VSfjRPv4XDUzuPDdUZ39DpCr6BsNCDhrQdkjr5aWkr NCNiYMGXzYOSPEYO3J3s2PBraE57jEZDYFqVWEAWC3puIaoX88bZo18O5J15DeVlBbMU T2BRJOJHqa/jvqQltbuomV6bH+l1Ye79856gR+O0UkHmHgoB3ctrXAuKFsZtHI7AraCb vScA== 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; bh=lDvCIgkeLneSEPCBzFUplS3NiECbaOx3rUImOCt7XnI=; fh=TCwTcKacvbSaaSyIkcyBIj5/vRjZl4C9Rrd8EaCFY0U=; b=YqTW/cUVeAh7/7sDxS1eYki8Etp7qIQo2kOuS62yg33eHMVb09+u+9o64fD0lKSdrI gcnAu7mWX3YOgLxoBR9XIdJ6DA6Eu9kgOSJ27JJm4sMNf5kx8Udi4A7a7Pi962/3yNHd USKEf9jf64IbtVXA3d4URI0x1lKHlExI0dTEpJJYZFihcS55ZXUUtQ5vIaQmt+hVt4l+ OrVdFEi3YAFMeyYMHK8w7+PvJr3hHra5eSsUsrLDqOcSErHkhS1r8nuaYXIincfQ5bci G1oRHTKkDfayP/V8iM1h1kTjq0CSdiz8SL8tw17Y20VqCLiCL6slXzr+vPwK0hAJDhuO mfuA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=c--e.de); spf=pass (google.com: domain of linux-kernel+bounces-28612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28612-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 207-20020a6300d8000000b005cf1b38c7cesi13017228pga.732.2024.01.16.23.46.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 23:46:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=c--e.de); spf=pass (google.com: domain of linux-kernel+bounces-28612-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28612-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D8862886BB for ; Wed, 17 Jan 2024 07:46:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D18E125DD; Wed, 17 Jan 2024 07:45:38 +0000 (UTC) Received: from cae.in-ulm.de (cae.in-ulm.de [217.10.14.231]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09B36125C0; Wed, 17 Jan 2024 07:45:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.10.14.231 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705477537; cv=none; b=B0svbNU3az1Ib/USr45Czd4ld+no8iAROie7BpCU7UX1WhAqiHa7a+ai4qe4qOVBAmhnwOtTbqTL+r48AqAyhPxXlV9CjavsGH9QW/iu5UM4Pb9jZZjbfQy6tQ+Y8J0eJqMLA1y3UUywkSTEdqF9SwZQ2BMsEgdsDr9iwh4BcJc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705477537; c=relaxed/simple; bh=XTlJMeq1LcRVPc4P3E1fOfdg//1N2HH8XnYT7USTq14=; h=Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=O4/8dr3JjrfZKeMiKepOHGp+1e2V4n4IV8fUVRwU6ZG5Y6wM9dRCzsZKbJq/1F+prZJxk3wW8peay2PVZbUlqUMB7tRqzwQFdYrHyIeEBUaQZ73fsw7gL7V9JexlNDFYEu+pk1S1uX1nDiU9SMlicR1WWf0ODzl1+iKW8sPHR2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c--e.de; spf=pass smtp.mailfrom=c--e.de; arc=none smtp.client-ip=217.10.14.231 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=c--e.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=c--e.de Received: by cae.in-ulm.de (Postfix, from userid 1000) id 4EE1D140327; Wed, 17 Jan 2024 08:45:32 +0100 (CET) Date: Wed, 17 Jan 2024 08:45:32 +0100 From: "Christian A. Ehrhardt" To: Greg Kroah-Hartman Cc: Heikki Krogerus , linux-usb@vger.kernel.org, Dell.Client.Kernel@dell.com, Neil Armstrong , Hans de Goede , Jack Pham , Fabrice Gasnier , Samuel =?utf-8?B?xIxhdm9q?= , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] usb: ucsi: Add missing ppm_lock Message-ID: References: <20240116224041.220740-1-lk@c--e.de> <20240116224041.220740-2-lk@c--e.de> <2024011726-exhaust-writing-29d4@gregkh> 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: <2024011726-exhaust-writing-29d4@gregkh> On Wed, Jan 17, 2024 at 06:44:40AM +0100, Greg Kroah-Hartman wrote: > On Tue, Jan 16, 2024 at 11:40:39PM +0100, Christian A. Ehrhardt wrote: > > Calling ->sync_write must be done while holding the PPM lock as the > > mailbox logic does not support concurrent commands. > > > > Thus protect the only call to ucsi_acknowledge_connector_change > > with the PPM lock as it calls ->sync_write. All other calls to > > ->sync_write already happen under the PPM lock. > > > > Signed-off-by: Christian A. Ehrhardt > > --- > > NOTE: This is not a theoretical issue. I've seen problems resulting > > from the missing lock on real hardware. > > What commit id does this fix? It's hard to tell (due to rewrites, logic and API changes). After digging a bit more I think it is at least a theoretical issues since the introduction of partner tasks. I'll wait a bit for additional feedback and fix this and other issues noticed by your patch bot (sorry for those) in the next iteration. > Should it be cc: stable? Not sure. The race is triggered much more ofter after the quirk added in patch 3/3, so this may not be a practical issue before that. I'll add the tag in the next iteration, though. thanks Christian