mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Cong Nguyen <congnt264@gmail.com>
Cc: Henrik Rydberg <rydberg@bitmath.org>,
	linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hwmon: (applesmc) fix key backlight workqueue leak on register failure
Date: Fri, 28 Aug 2026 07:49:32 -0700	[thread overview]
Message-ID: <d2e6a29d-e707-4d91-a7aa-4177d34ec4d6@roeck-us.net> (raw)
In-Reply-To: <20260828105413.2401385-1-congnt264@gmail.com>

On Fri, Aug 28, 2026 at 05:54:13PM +0700, Cong Nguyen wrote:
> applesmc_create_key_backlight() allocates applesmc_led_wq before calling
> led_classdev_register(). When register fails, the error is returned to
> applesmc_init(), which jumps to out_light_sysfs and skips
> applesmc_release_key_backlight(), leaking the workqueue.
> 
> Destroy the workqueue on the register failure path. The bug was introduced
> when the inline init block was refactored into a helper that returns errors
> directly, dropping the old out_light_wq unwind label.
> 
> Fixes: 0b0b5dff8967 ("hwmon: (applesmc) Simplify feature sysfs handling")
> Cc: stable@vger.kernel.org
> Assisted-by: Claude:claude-opus-4
> Signed-off-by: Cong Nguyen <congnt264@gmail.com>

Applied.

Thanks,
Guenter

      reply	other threads:[~2026-08-28 14:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-28 10:54 Cong Nguyen
2026-08-28 14:49 ` Guenter Roeck [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=d2e6a29d-e707-4d91-a7aa-4177d34ec4d6@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=congnt264@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@bitmath.org \
    /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

all inboxes | Powered by JetHome®