From: sashiko-bot@kernel.org
To: "Liang Haowen" <nbg2974@gmail.com>
Cc: linux-scsi@vger.kernel.org, linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH RFC v4 1/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures
Date: Tue, 15 Sep 2026 13:00:50 +0000 [thread overview]
Message-ID: <20260915130050.E8CDB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <202609152112.RFCv4-1.lhw@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] leds: data race on subled_info array causes torn color updates
- [Low] leds: build failure due to undefined macro kzalloc_obj
- [Low] leds: build failure due to missing argument in blk_rq_map_kern()
--
commit e6ce9b3b67cc2aa4897215acc2c62600810790a8
Author: Liang Haowen <nbg2974@gmail.com>
leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures
This commit introduces a driver for ASUS ROG external NVMe enclosures that
exposes 4 independently addressable LEDs via the LED multicolor class. It
uses a SCSI device handler matched by vendor INQUIRY to send custom ENE
sequences over passthrough SCSI commands.
> diff --git a/drivers/leds/leds-asus-aura-scsi.c b/drivers/leds/leds-asus-aura-scsi.c
> new file mode 100644
> index 0000000000000..089cc3dcee105
> --- /dev/null
> +++ b/drivers/leds/leds-asus-aura-scsi.c
[ ... ]
> +static int ene_write(struct scsi_device *sdev, u16 reg,
> + const void *data, u8 arg_count)
> +{
> + struct request *rq;
> + struct scsi_cmnd *scmd;
> + u8 cdb[ENE_CDB_LEN];
> + int ret;
> +
> + ene_build_cdb(cdb, reg, arg_count);
> +
> + rq = scsi_alloc_request(sdev->request_queue, REQ_OP_DRV_OUT, 0);
> + if (IS_ERR(rq))
> + return PTR_ERR(rq);
> +
> + if (arg_count) {
> + ret = blk_rq_map_kern(rq, (void *)data, arg_count, GFP_NOIO);
[Severity: Low]
Does this cause a build failure? The kernel API blk_rq_map_kern() requires 5
arguments, where the first parameter should be the struct request_queue *q,
but it is called here with only 4 arguments.
> + if (ret)
> + goto out;
> + }
[ ... ]
> +static void asus_aura_set(struct led_classdev *cdev,
> + enum led_brightness brightness)
> +{
> + struct led_classdev_mc *mc = lcdev_to_mccdev(cdev);
> + struct asus_aura_led *led =
> + container_of(mc, struct asus_aura_led, mc_cdev);
> + struct asus_aura_zone *zone = led->zone;
> + unsigned long flags;
> +
> + led_mc_calc_color_components(mc, brightness);
> +
> + spin_lock_irqsave(&zone->lock, flags);
[Severity: Medium]
Could this lead to a data race on the subled_info array? The LED core allows
concurrent brightness_set callbacks for the same LED (for instance, from
sysfs and a hardware trigger). The helper led_mc_calc_color_components()
modifies the shared mc->subled_info array locklessly before the driver
acquires its spinlock. If multiple threads update the brightness
concurrently, they might interleave their writes to the array, causing the
winning thread to read a mix of old and new color components.
> + /* ENE colour register byte order is R, B, G. */
> + led->rgb[0] = led->subled[0].brightness;
> + led->rgb[1] = led->subled[2].brightness;
> + led->rgb[2] = led->subled[1].brightness;
> + zone->dirty |= BIT(led->index);
> + spin_unlock_irqrestore(&zone->lock, flags);
> +
> + schedule_work(&zone->work);
> +}
[ ... ]
> +static int asus_aura_attach(struct scsi_device *sdev)
> +{
> + struct asus_aura_zone *zone;
> + int i, ret;
> +
> + if (strncmp(sdev->vendor, ARION_INQ_VENDOR, strlen(ARION_INQ_VENDOR)) ||
> + strncmp(sdev->model, ARION_INQ_MODEL, strlen(ARION_INQ_MODEL)))
> + return SCSI_DH_DEV_UNSUPP;
> +
> + zone = kzalloc_obj(*zone, GFP_KERNEL);
[Severity: Low]
Does this code fail to compile? It looks like it invokes an undefined macro
kzalloc_obj() instead of the standard kzalloc() function to allocate memory.
> + if (!zone)
> + return SCSI_DH_NOMEM;
> + zone->sdev = sdev;
--
Sashiko AI review · https://sashiko.dev/#/patchset/202609152112.RFCv4-1.lhw@gmail.com?part=1
next prev parent reply other threads:[~2026-09-15 13:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 14:26 [PATCH RFC 0/1] leds: add ASUS Aura SCSI driver for ROG NVMe enclosures Liang Haowen
2026-09-01 14:34 ` [PATCH RFC 1/1] " Liang Haowen
2026-09-01 14:52 ` sashiko-bot
2026-09-03 12:00 ` [PATCH RFC v2 0/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED " Liang Haowen
2026-09-03 12:00 ` [PATCH RFC v2 1/1] " Liang Haowen
2026-09-03 12:24 ` sashiko-bot
2026-09-03 16:13 ` Lee Jones
2026-09-04 12:30 ` [PATCH RFC v3 0/1] " Liang Haowen
2026-09-04 12:30 ` [PATCH RFC v3 1/1] " Liang Haowen
2026-09-04 13:15 ` sashiko-bot
2026-09-10 9:32 ` Lee Jones
2026-09-15 12:48 ` [PATCH RFC v4 0/1] " Liang Haowen
2026-09-15 12:49 ` [PATCH RFC v4 1/1] " Liang Haowen
2026-09-15 13:00 ` sashiko-bot [this message]
2026-09-16 10:43 ` Lee Jones
2026-09-16 12:15 ` [PATCH RFC v5 0/1] " Liang Haowen
2026-09-16 12:15 ` [PATCH RFC v5 1/1] " Liang Haowen
2026-09-16 12:27 ` sashiko-bot
2026-09-16 13:06 ` Lee Jones
2026-09-16 14:22 ` [PATCH RFC v6 0/1] " Liang Haowen
2026-09-16 14:22 ` [PATCH RFC v6 1/1] " Liang Haowen
2026-09-16 14:38 ` sashiko-bot
2026-09-17 11:28 ` Lee Jones
2026-09-17 11:49 ` Liang Haowen
2026-09-23 9:45 ` Lee Jones
2026-09-23 10:18 ` Liang Haowen
[not found] ` <20260923102812.2353292-1-nbg2974@gmail.com>
2026-09-23 10:12 ` Ilpo Järvinen
2026-09-16 14:23 ` [PATCH RFC v5 " Liang Haowen
2026-09-16 12:15 ` [PATCH RFC v4 " Liang Haowen
2026-09-15 12:49 ` [PATCH RFC v3 " Liang Haowen
2026-09-04 12:45 ` [PATCH RFC v2 " Liang Haowen
-- strict thread matches above, loose matches on Subject: below --
2026-09-23 10:30 [RFC v7 0/1] " Liang Haowen
2026-09-23 10:30 ` [RFC v7 1/1] " Liang Haowen
2026-09-23 10:44 ` sashiko-bot
2026-09-23 10:45 ` Lee Jones
2026-09-23 11:19 ` Liang Haowen
2026-09-23 10:41 ` [RFC v7 0/1] " Ilpo Järvinen
2026-09-23 12:35 ` Denis Benato
2026-09-23 12:59 ` Liang Haowen
2026-09-23 15:11 ` Marco Scardovi
2026-09-25 12:22 ` Liang Haowen
2026-09-25 12:41 ` Marco Scardovi
2026-09-25 12:45 ` Liang Haowen
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=20260915130050.E8CDB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nbg2974@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox