Re: [PATCH v2] leds: tca6507: Fix use-after-free on unbind
From: Danish Khateeb
Date: Wed Oct 28 2026 - 09:49:11 EST
On Wed, 28 Oct 2026, Lee Jones wrote:
> Please review, explain or fix the Sashiko review(s).
Sashiko is right that the "LED off" write queued on unbind gets
cancelled, but that predates 1b5c2fa7081c: remove() used to call
led_classdev_unregister() and then cancel_work_sync(), the same order
this patch restores. Since 1b5c2fa7081c that write only ran on freed
memory. If you'd like the LEDs turned off on unbind, I can send a
separate patch that flushes the work instead of cancelling it.
Thanks,
Danish