Re: [PATCH] staging: greybus: light: initialize channel lock before registration
From: Greg Kroah-Hartman
Date: Wed Aug 19 2026 - 08:41:38 EST
On Wed, Aug 19, 2026 at 08:32:45PM +0800, Runyu Xiao wrote:
> On Tue, Aug 18, 2026 at 20:23:10 +0200, Greg Kroah-Hartman wrote:
> > How was this found and tested?
>
>
> Found by code inspection: gb_lights_channel_register() publishes the
> LED class device and its brightness callback before
> mutex_init(&light->channels[i].lock) runs, so a concurrent brightness
> update can take an uninitialized mutex.
<snip>
Don't send html email with tracking images in it to a public mailing
list, they are rejected and generally considered bad-form.
greg k-h