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: <1250729056.2716.37.camel@morgan.walls.org>
Date:	Wed, 19 Aug 2009 20:44:16 -0400
From:	Andy Walls <awalls@...ix.net>
To:	Greg KH <greg@...ah.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	pm list <linux-pm@...ts.linux-foundation.org>,
	Alan Stern <stern@...land.harvard.edu>,
	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org
Subject: Re: linux-next: suspend tree build warnings

On Wed, 2009-08-19 at 16:36 -0700, Greg KH wrote:
> On Wed, Aug 19, 2009 at 11:38:03PM +0200, Rafael J. Wysocki wrote:
> > On Wednesday 19 August 2009, Stephen Rothwell wrote:
> > > Hi Rafael,
> > 
> > Hi,
> > 
> > > Today's linux-next build (x86_64 allmodconfig) produced these warnings:
> > > 
> > > drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_i2c_enumeration’:
> > > drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame size of 2256 bytes is larger than 2048 bytes
> > > drivers/media/dvb/frontends/dib3000mc.c: In function ‘dib3000mc_i2c_enumeration’:
> > > drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2160 bytes is larger than 2048 bytes
> > > 
> > > Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("PM:
> > > Introduce core framework for run-time PM of I/O devices (rev. 17)").
> > 
> > Well.
> > 
> > This commit increases the size of struct device quite a bit and both of the
> > drivers above create a "state" object on the stack that contains struct device
> > among other things.
> 
> Ick.  struct device should _never_ be on the stack, why would this code
> want to do such a thing?

It appears that the state object is a dummy being used to detect and
twiddle some identical chips on the i2c bus.  The functions called only
use the "i2c_adapter" and "cfg" member of the dummy state object, but
those functions want that state object as an input argument.

<obvious>
The simplest fix is dynamic allocation of the dummy state object with
kmalloc() and then to free it before exiting the function.
</obvious>

Regards,
Andy


> thanks,
> 
> greg k-h


--
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