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

From: Jörn Engel

Date: Thu Sep 17 2026 - 15:47:45 EST


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.

Jörn

--
Do not stop an army on its way home.
-- Sun Tzu