lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Dec 2022 13:13:30 +0200
From:   Tony Lindgren <tony@...mide.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andy Shevchenko <andriy.shevchenko@...el.com>,
        Jiri Slaby <jirislaby@...nel.org>,
        Johan Hovold <johan@...nel.org>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Vignesh Raghavendra <vigneshr@...com>,
        linux-serial <linux-serial@...r.kernel.org>,
        linux-omap@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v4 1/1] serial: core: Start managing serial
 controllers to enable runtime PM

* Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> [221208 10:48]:
> On Thu, 8 Dec 2022, Tony Lindgren wrote:
> 
> > * Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com> [221208 09:12]:
> > > On Wed, 7 Dec 2022, Tony Lindgren wrote:
> > > > +	ret = serial_core_add_one_port(drv, port);
> > > > +	if (ret)
> > > > +		return ret;
> > > > +
> > > > +	mutex_lock(&port_mutex);
> > > > +
> > > > +	/* Inititalize a serial core controller device if needed */
> > > > +	ctrl_dev = serial_core_ctrl_find(drv, port->dev, port->ctrl_id);
> > > > +	if (!ctrl_dev) {
> > > > +		ctrl_dev = serial_core_ctrl_device_add(port);
> > > > +		if (!ctrl_dev)
> > > > +			goto err_remove_port;
> > > > +		allocated = true;
> > > > +	}
> > > > +
> > > > +	/* Initialize a serial core port device */
> > > > +	ret = serial_core_port_device_add(ctrl_dev, port);
> > > 
> > > How is ->port_dev supposed to work here?
> > > 
> > > ->port_dev is not set until in serial_core_port_device_add() but you made
> > > serial_core_add_one_port() call before that.
> > 
> > Hmm do you mean you want to call serial_core_add_one_port() later after
> > serial_core_port_device_add()?
> > 
> > Or are you seeing some uninitialized use of port->port_dev (and not
> > port->dev)?
> 
> With the other patch on top of this, yes, I did see uninitialized 
> port->port_dev already in serial_core_add_one_port()->uart_configure_port().
> While that could be solved by removing the pm_runtime_*() calls from 
> there, I think it's a generic problem because after 
> serial_core_add_one_port() the port can have anything happening on it, no?

OK. Sounds like it should get sorted out by moving the call to
serial_core_add_one_port() to happen after the devices are created.

Regards,

Tony

Powered by blists - more mailing lists