From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795903012; b=z0Uh3LlwksEQ9+i7Sx7OKAzqhck7fTPFGYDElzz3plPT3/0p7w5dPDMnzFxHPICyKIu0 /RSeBgbeskdedmRqGKKdbVjlCdHbegRKHRGTehHnxTNeN4m98YOpRfNKfuOwrp1sgHTuj PT/QA2L2/4PCKsnFUizDubGYPf6FpWoUqDwLgRzDvV25A0GGsSAFECDqdnCMlJuSTSI0G oQRgcDy6bBaCxkGzslvv3t4ef2htwUf/G60BiAGh4+Cm+8OQO252OVYlR8+V7JTMjb/c/ 0+31c/wCMAjhrQx6K/1e5NRN0z+ynbeaxcftmpnoLQ3CKNw7HkpMDIZlTYlE4M6HuNQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795903012; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Vc8T4AUbaGdfllrmIp65krrj1mQJsTFO8VnXkb8iSOo=; b=rhhxvJf5H+qZtS55PyWpRw9O+Nyh9fq2vG5fGAHBh2HBR1IsP2de8U0ega1F4LO8teVo 74qFsGVasHPi1+VbvHJEHh7fX+gYSn2x0yhkx2YsRqFDyINfOPuQxsvaw/UsiERFhTYgQ wbEqFOoSSGVDYTGspQVs38vrejmR85AcKrSlmuoCxWROu7Z5Hk/5K89oCsgqWP/f/VwXh 9dXpch+5BDzzVch1p/9gTYXAuPR/9BT9CjP4+oTej9uAll3OS5MCOxxkc731GUsf7e9kt YdamumgwEroEEdt2b8TCCl7G9occ8m0ZX9245owU8RsKI9pTUzhfoMklrua4GLbuaow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MJHJ475K; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC1F4606A332 for ; Sat, 28 Nov 2026 21:56:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=MJHJ475K Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95F881F0089B; Sat, 28 Nov 2026 21:56:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795903011; bh=Vc8T4AUbaGdfllrmIp65krrj1mQJsTFO8VnXkb8iSOo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=MJHJ475KCuWIG4iuz/4snSbRtc0ZuZ5j6sKZJGwuWzf0uZoVY8kL2pbgDw2D0mhBQ OGsOJh9oc49ZQrwPkHYSrPubR++tAM9duDNW+90FiFi219bqiTwObGtolnk77M7S3P Rb9VAJTfuECATWZ63LLLoC7c+EDhe8w2VCdJaWNdN123eQ4WZ0ueJaiKaJuEHtQ6uo lppAcRbFJ+0Bz6mpC9aMOutZuEFT+qnvir9qlUkHO5V9ji14PUmnOmF6YBEO+Tf/lT 4Q2AXhk4dRnlFXcO/EtgZCwfHfi0qGBQOz3V9DovPkc7SdPhIEIZiBHqB8xuln9R+V Hh2M2Jv60t8vg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/3] leds: class: Fix the LED name in the debug message after registering Reply-To: sashiko-reviews@lists.linux.dev To: "Carlo Szelinsky" Cc: linux-leds@vger.kernel.org, lee@kernel.org In-Reply-To: <20261128215230.66205-2-github@szelinsky.de> References: <20261128215230.66205-1-github@szelinsky.de> <20261128215230.66205-2-github@szelinsky.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Nov 2026 21:56:51 +0000 X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [Critical] leds: uninitialized rwsem race in led_trigger_read() [1] -- commit 49db16c343f5b4c3b48a74345ac2e46cd2c2cac1 Author: Carlo Szelinsky leds: class: Fix the LED name in the debug message after registering This commit updates the registration debug message in led_classdev_register_ext() to print dev_name(led_cdev->dev) instead of led_cdev->name, which is unset when init_data is used. > diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c > index 00be3cb96c00f..23d692035150f 100644 > --- a/drivers/leds/led-class.c > +++ b/drivers/leds/led-class.c > @@ -586,7 +586,7 @@ int led_classdev_register_ext(struct device *parent, > mutex_unlock(&led_cdev->led_access); [Severity: Critical] This problem wasn't introduced by this patch, but can led_trigger_read() call down_read() on led_cdev->trigger_lock before it is initialized [1]? In led_classdev_register_ext(), device_create_with_groups() exposes the trigger sysfs attribute before init_rwsem(&led_cdev->trigger_lock) runs. Unlike other sysfs callbacks, led_trigger_read() does not acquire led_cdev->led_access: CPU0 CPU1 led_classdev_register_ext() mutex_lock(&led_cdev->led_access) device_create_with_groups(...) led_trigger_read() down_read(&led_cdev->trigger_lock) <-- uninitialized rw_semaphore init_rwsem(&led_cdev->trigger_lock) A concurrent read of the trigger sysfs file during registration operates on an uninitialized rw_semaphore, corrupting lock state and crashing the kernel. [1] https://sashiko.dev/#/bug/linux-376c7db5-ddc1-4faa-9f5b-43d2d3b7cb0d --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261128215230.6620= 5-1-github@szelinsky.de?part=3D1