[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6DpXnBruLUvXCVh@smile.fi.intel.com>
Date: Mon, 3 Feb 2025 18:05:50 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, Lyude Paul <lyude@...hat.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Liam Girdwood <lgirdwood@...il.com>, Lukas Wunner <lukas@...ner.de>,
Mark Brown <broonie@...nel.org>,
MaĆra Canal <mairacanal@...eup.net>,
Robin Murphy <robin.murphy@....com>,
Simona Vetter <simona.vetter@...ll.ch>,
Zijun Hu <quic_zijuhu@...cinc.com>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 1/3] driver core: add a faux bus for use when a simple
device/bus is needed
On Mon, Feb 03, 2025 at 04:46:56PM +0100, Greg Kroah-Hartman wrote:
> On Mon, Feb 03, 2025 at 04:35:45PM +0100, Greg Kroah-Hartman wrote:
> > > > + */
> > > > +struct faux_device *__faux_device_create(const char *name,
> > > > + struct faux_driver_ops *faux_ops,
> > > > + struct module *owner)
> > > > +{
> > > > + struct device_driver *drv;
> > > > + struct device *dev;
> > > > + struct faux_object *faux_obj;
> > > > + struct faux_device *faux_dev;
> > > > + int ret;
> > >
> > > > + faux_obj = kzalloc(sizeof(*faux_obj) + strlen(name) + 1, GFP_KERNEL);
> > >
> > > Potential overflow. To avoid one may use struct_size() from overflow.h.
> >
> > Users should not be providing the string here. Again, this comes from
> > platform.c.
>
> Sima just proved me wrong, I'll go check for this now, thanks for
> pointing it out.
Ah, you are welcome!
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists