Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp280761lqs; Thu, 13 Jun 2024 09:49:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUDgiOkhiqoBOfxJ0kwRrObGxruP2pE4XIJ1Yz1xIc39FYPUePeliYywXmHxpyl097OrUabCjQGDPjkkQ4FswjrCreH8hJB/lJZNyX2IA== X-Google-Smtp-Source: AGHT+IHo5T9WC0QfQqAxLAduXGlEy+A1H04cXhuiPa+XAJY6/x0R7AKPZBxM+Ugt9ziLZJIEihzn X-Received: by 2002:a05:622a:c:b0:43a:d063:c8b1 with SMTP id d75a77b69052e-442168eb813mr2010021cf.33.1718297358560; Thu, 13 Jun 2024 09:49:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718297358; cv=pass; d=google.com; s=arc-20160816; b=jnmXAp+4cxvfW75IMZjV9+hdFJjJw+TdolfeMyBmiVt0Cc1M7SnY9jtQvUmS7wzEeW 19qFBA/E8+6etUBt5Fi9L6L8L1s2vNQizX9sGsjz6++Jj72ir/6km5+1+nEOoY3GDGLv m8rpNvf2c/hx1bVkjxlq4Zd7WLGd6fZxSLW6nqGdMrYs8l6HxM3ATus6VK7CLXlIpY3o krcFVzNKmYU5SGHf5LjhHI9lwtJaOrz0v7Q6XjoWDsbHEx3TqSVUrfmogFaOI+31CaSS /eNDhsSR+L5zhX5WdaGT8jF2XpNC3H4TA/qmeHhBlCXcxrujcquZJ/rWULbfwv6qlkrK Dghg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=87JUNv1I1Kg8m/oMM87QdlsYKolCVY0t1fFjjkKmR6M=; fh=bnGG+rr0TJtmpbzlOMIPtIq7KUMmW19bvwPGx3+LXlc=; b=mZ+x6osYzxnbC1LX/F8/Yx7WpLjEJAqzEaeADpCduA2ngdOw0SyDeX46Rs9UpXIINf RuujVgzNX47dcJL8MAtDnxc9uPz2iFIAkCL1T66YQ0HQPpQJMDlYM5EvkdJaTA1Klm5I uzHBAEidBbNU4Z5aEOmYIA65uEOEGVlcxhsUt8RI+p78CD93ZGsTjEeBi7gC9pzkD6iB gowcVezsAYwZNaD1lxzAJvwxXAk6r5qb+PRynu+OFXvzFw447Hq1Kfpb/nVgsGllMjtS m0cqkkvf5BHE9DBsbwUFlTZH6ZhJgmah0JGEtwVu8zXGk1pZMIztV9+1/yRmtWySttZl E7cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKp6yVhc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213678-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-441ef3d96besi8209141cf.182.2024.06.13.09.49.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 09:49:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bKp6yVhc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213678-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213678-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 47E001C2082D for ; Thu, 13 Jun 2024 16:49:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1538C1487D8; Thu, 13 Jun 2024 16:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bKp6yVhc" 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 3B62E63A5; Thu, 13 Jun 2024 16:49:04 +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=1718297345; cv=none; b=GX3pWrejo1H8XdGhbuzJARDkMm8Mj0Sgq7/BIlKuelN78hdC96rR3N+Se1a3T9cOSz0jYKyCGzipThRnnjK9mQhNF9IQLopC+XvDxIkcj5ZdHC7NHZOpK5jkpOIGqW1WqBigRXqzEaUQb+UnXIvb02yR0C4RSnP3kLM/pYOJ5U4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718297345; c=relaxed/simple; bh=cXDfzoOwKRqGSzwNxg87SOL3BlAK0S91RSWtUV30amU=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=VUkO2CSr1Ty7n38sVj9Vg0FAt+qKj6+jz5EdoCVN0uXF5cG6mTGkUWfd1ZbtLimy/3py4TTVOdSbU7MiYlZayLgfYqifTpvs+w+tfRhzNkz3ViKw9H0M5+fTLvKWyDU74fdd3jifyo6mzArt+9sP3PAb9QKpdcPT2ectrUsF5K8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bKp6yVhc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 508F7C2BBFC; Thu, 13 Jun 2024 16:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718297344; bh=cXDfzoOwKRqGSzwNxg87SOL3BlAK0S91RSWtUV30amU=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=bKp6yVhckJhq4Ixx080oPJijRcC/j0BChXP0FprCj5qiwAgUDBPbf35SaLm740cUX 29hK0G44ZxDDma5/sWdka0cZDt4oCzapWj/G3juXA/03InqxZxc+epH0FlUHxhEByj UXvoHTLPpzkpwOzBj0BCWeYp8mXwrXfVBEi+OspBLrPHgsWaAibPpNINC5VCDd8wk8 bt50cJm5mvs6y4Os3uHtcG4qs1Qb2lX9cbyXalyFb5vUo5D70ifSoq3QGeCvuYYwGe QzGpsZsAihbqPVrWPrzO6PvPhp5y8b6CDSyfJ+tk/2wXFs++sahyj95M6WRSs12six gI7eEnSietG1w== From: Lee Jones To: Pavel Machek , Jacek Anaszewski , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Dustin Howett , stable@vger.kernel.org In-Reply-To: <20240613-led-trigger-flush-v2-1-f4f970799d77@weissschuh.net> References: <20240613-led-trigger-flush-v2-1-f4f970799d77@weissschuh.net> Subject: Re: (subset) [PATCH v2] leds: triggers: flush pending brightness before activating trigger Message-Id: <171829734304.2712359.10662321406977554017.b4-ty@kernel.org> Date: Thu, 13 Jun 2024 17:49:03 +0100 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: 8bit X-Mailer: b4 0.13.0 On Thu, 13 Jun 2024 17:24:51 +0200, Thomas Weißschuh wrote: > The race fixed in timer_trig_activate() between a blocking > set_brightness() call and trigger->activate() can affect any trigger. > So move the call to flush_work() into led_trigger_set() where it can > avoid the race for all triggers. > > Applied, thanks! [1/1] leds: triggers: flush pending brightness before activating trigger commit: ad5851de0eb12e088a570092242e421cd00691c5 -- Lee Jones [李琼斯]