Re: [PATCH] wifi: iwlegacy: 3945: protect sysfs TX power update with mutex

From: Stanislaw Gruszka

Date: Mon Oct 05 2026 - 11:40:46 EST


On Mon, Oct 05, 2026 at 03:14:20PM +0200, Johannes Berg wrote:
> On Tue, 2026-09-29 at 20:14 +0200, Stanislaw Gruszka wrote:
> > On Tue, Sep 29, 2026 at 08:33:29PM +0800, Runyu Xiao wrote:
> > > The sysfs tx_power store handler calls il3945_hw_reg_set_txpower(), whose
> > > command path requires il->mutex to be held. The callback bypasses the mutex
> > > used by the other 3945 control paths, triggering the lockdep assertion and
> > > allowing concurrent TX power updates to race with other command or state
> > > transitions. Serialize the update with the same mutex.
> > >
> > > Fixes: b481de9ca074 ("[IWLWIFI]: add iwlwifi wireless drivers")
> > > Cc: stable@xxxxxxxxxxxxxxx
> > > Assisted-by: LLM
> > > Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>
> > Acked-by: Stanislaw Gruszka <stf_xl@xxxxx>
>
> I think we should rather remove these files: custom, undocumented sysfs
> shouldn't be there anyway...

Maybe some of them should be moved to debugfs. I'll consider that,
and move/remove them.

Regards
Stanislaw