From: sashiko-bot@kernel.org
To: "A. Sverdlin" <alexander.sverdlin@siemens.com>,
linux-leds@vger.kernel.org
Cc: lee@kernel.org
Subject: Re: [PATCH v6 5/5] leds: trigger: netdev: Serialize mode/interval stores with trigger lock
Date: Tue, 27 Oct 2026 12:17:36 +0000 [thread overview]
Message-ID: <sashiko-outbox-186524@kernel.org> (raw)
In-Reply-To: <20261027113349.383147-6-alexander.sverdlin@siemens.com>
> From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
>
> netdev_led_attr_store() and interval_store() update ->mode and run
> set_baseline_state() without trigger_data->lock. kernfs only serializes
> writes to the same file, so two attribute writes race on the non-atomic
> read-modify-write of ->mode:
>
> CPU0 (echo 1 > link_10) CPU1 (echo 1 > link_100)
> ----------------------- ------------------------
> mode = trigger_data->mode;
> mode = trigger_data->mode;
> set_bit(LINK_10, &mode);
> set_bit(LINK_100, &mode);
> trigger_data->mode = mode;
> trigger_data->mode = mode; // LINK_10 lost
> [ ... ]
>
> Cc: stable@vger.kernel.org
> Closes: https://lore.kernel.org/all/sashiko-outbox-178980@kernel.org/
> Fixes: d5e01266e7f5 ("leds: trigger: netdev: add additional specific link speed mode")
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261027113349.383147-1-alexander.sverdlin@siemens.com?part=5
prev parent reply other threads:[~2026-10-27 12:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 11:33 [PATCH v6 0/5] leds: trigger: netdev: fix sysfs_update_group() races A. Sverdlin
2026-10-27 11:33 ` [PATCH v6 1/5] leds: trigger: netdev: Put netdev on activate error path A. Sverdlin
2026-10-27 11:40 ` sashiko-bot
2026-10-27 11:33 ` [PATCH v6 2/5] leds: trigger: netdev: Access net_dev under trigger_data->lock in the worker A. Sverdlin
2026-10-27 11:50 ` sashiko-bot
2026-10-27 11:33 ` [PATCH v6 3/5] leds: trigger: netdev: Fix sysfs_update_group() races A. Sverdlin
2026-10-27 12:03 ` sashiko-bot
2026-10-27 11:33 ` [PATCH v6 4/5] leds: trigger: netdev: Report invalid interval to user space A. Sverdlin
2026-10-27 12:06 ` sashiko-bot
2026-10-27 11:33 ` [PATCH v6 5/5] leds: trigger: netdev: Serialize mode/interval stores with trigger lock A. Sverdlin
2026-10-27 12:17 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-186524@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alexander.sverdlin@siemens.com \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.