[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWoU2nKuTGloI4sS@MNI-190>
Date: Fri, 16 Jan 2026 11:37:14 +0100
From: Jose Javier Rodriguez Barbarin <dev-josejavier.rodriguez@...gon.com>
To: Johannes Thumshirn <morbidrsa@...il.com>
CC: gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mcb: Fix incorrect sanity check
On Fri, Jan 16, 2026 at 11:33:02AM +0100, Johannes Thumshirn wrote:
> On 1/16/26 11:30 AM, Jose Javier Rodriguez Barbarin wrote:
> > On Fri, Nov 21, 2025 at 11:54:08AM +0100, Johannes Thumshirn wrote:
> > > On 11/21/25 11:33 AM, Jose Javier Rodriguez Barbarin wrote:
> > > > On Thu, Nov 20, 2025 at 12:48:45PM +0100, Johannes Thumshirn wrote:
> > > > > On 11/20/25 12:37 PM, Jose Javier Rodriguez Barbarin wrote:
> > > > > > __mcb_register_driver() makes some sanity checks over mcb_driver
> > > > > > to check if .probe and .remove callbacks are set. However, not all
> > > > > > mcb device drivers implement .remove callback.
> > > > > >
> > > > > > Remove .remove check to ensure all mcb device drivers can be loaded.
> > > > > The only driver I can see that doesn't implement a .remove method is
> > > > > gpio-menz127.c.
> > > > Yes. In the past gpio-menz127.c also implemented .remove method, however in
> > > >
> > > > 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
> > > >
> > > > The driver changed, using now devm_* functions so .remove was no longer necessary.
> > > >
> > > > > Is this safe?
> > > > >
> > > > From the point of view of mcb bus it should be safe becase I protected the call
> > > > of .remove on mcb_remove(), preventing possible crashes when the driver is removed
> > > > from the bus.
> > > >
> > > > I'm afraid I'm lossing something because I cannot understand why these changes are or
> > > > not safe. Could you explain me why you understand that these changes are unsafe?
> > >
> > > Thanks this is the information I was missing from the changelog. I'll change
> > > the commit message to:
> > >
> > > __mcb_register_driver() makes some sanity checks over mcb_driver
> > > to check if .probe and .remove callbacks are set. However, since commit
> > > 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
> > > removed the .remove callback from menz127-gpio.c, not all mcb device
> > > drivers implement .remove callback.
> > >
> > > Remove .remove check to ensure all mcb device drivers can be loaded.
> > >
> > > I'll also add
> > >
> > > Fixes: 3bd13ae04ccc ("gpio: menz127: simplify error path and remove remove()")
> > >
> > >
> > > Thanks,
> > >
> > > Johannes
> > >
> > Hi Johannes,
> >
> > I noticed this patch is not uploaded yet.
> >
> > I can submit it again changing the commit message as you commented above.
> >
> > Thank you,
> >
> > Javier R.
>
> Yes I wanted to forward it to Greg and then I forgot I'm sorry. But I think
> it's still in time for v6.20. I'll do so ASAP.
>
No problem, it is OK for me.
Thank you so much.
Javier R.
Powered by blists - more mailing lists