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]
Message-ID: <20150722142713.GE22138@pali>
Date:	Wed, 22 Jul 2015 16:27:13 +0200
From:	Pali Rohár <pali.rohar@...il.com>
To:	Sebastian Reichel <sre@...nel.org>
Cc:	Michael Welling <mwelling@...e.org>, Pavel Machek <pavel@....cz>,
	Tony Lindgren <tony@...mide.com>,
	Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
	Aaro Koskinen <aaro.koskinen@....fi>,
	Nishanth Menon <nm@...com>, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: linux 4.2-rc1 broken Nokia N900

On Wednesday 22 July 2015 15:33:18 Sebastian Reichel wrote:
> Hi,
> 
> On Wed, Jul 22, 2015 at 09:27:32AM +0200, Pali Rohár wrote:
> > > > diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
> > > > index 5867384..f7d9ffd 100644
> > > > --- a/drivers/spi/spi-omap2-mcspi.c
> > > > +++ b/drivers/spi/spi-omap2-mcspi.c
> > > > @@ -245,6 +245,7 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable)
> > > >  
> > > >  static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
> > > >  {
> > > > +       struct omap2_mcspi *mcspi = spi_master_get_devdata(spi->master);
> > > >         u32 l;
> > > >  
> > > >         /* The controller handles the inverted chip selects
> > > > @@ -255,6 +256,8 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
> > > >                 enable = !enable;
> > > >  
> > > >         if (spi->controller_state) {
> > > > +               pm_runtime_get_sync(mcspi->dev);
> > > > +
> > > 
> > > Should the return code should be checked here as with the other
> > > instances of pm_runtime_get_sync?
> 
> Yes. If it fails, the line fetch error would be triggered again.
> 
> Probably the set_cs callback should also be changed, so that it can
> return an error code. This is not something for 4.2-rc, though.
> 
> > Anyway, what do you think about adding gcc macro for pm_runtime_get_sync
> > function which report compiler warning when return value is not checked?
> 
> Adding __must_check to pm_runtime_get_sync() should be discussed
> separately with the relevant people in Cc. A quick grep in drivers/
> reveals a huge amount of code not handling pm_runtime_get_sync's return
> code.
> 
> -- Sebastian

Two times, missing check for pm_runtime_get_sync() cased kernel crash on
Nokia N900. See that crypto commits. I think all drivers which do not
check should be fixed. Otherwise we can see another mysterious problems.

Sebastian, can you CC relevant people? Or maybe start new thread?

-- 
Pali Rohár
pali.rohar@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ