AW: [syzbot] [fs?] possible deadlock in ovl_create_object (2)

From: Richard Weinberger

Date: Sat Sep 19 2026 - 03:43:28 EST


Am Thu, Sep 17, 2026, 20:16 schrieb Jörn Engel <joern@xxxxxxxxxxxxxxxx>:
> On Thu, Sep 17, 2026 at 01:28:22PM +0530, Chris Roy wrote:
> >
> > drivers/mtd/devices/block2mtd.c | 118 ++++++++++++++++++++-----
> > 1 file changed, 98 insertions(+), 20 deletions(-)
> [...]
> > /* Static info about the MTD, used in cleanup_module */
> > static LIST_HEAD(blkmtd_device_list);
> > +/* Protects blkmtd_device_list and early-boot paramline updates */
> > +static DEFINE_MUTEX(block2mtd_mutex);
> > +static struct workqueue_struct *block2mtd_wq;
>
> This is just awful taste. You are inside a file called "block2mtd".
> The prefix to the mutex an workqueue add absolutely nothing. Calling
> them just plain "mutex" and "wq" would have been a better choice.
>
> Good names should tell the human reader something. What is the mutex
> protecting? What is the purpose of the workqueue? Pick a name that
> gives us some information like that, please!
>
>
> You seem to have used AI to write this code, so the bad name choice was
> presumably also done by AI. But you are still associating your own good
> name with the code. You should try not to harm your good name by
> letting things like this slide through unchallenged.

While we're here, maybe it's time to add a decent configfs interface to
this driver instead of configuring through module parameters.
That way also multiple instances are possible.

Thanks,
//richard