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:	Mon, 06 Jun 2011 15:10:57 -0700
From:	Joe Perches <joe@...ches.com>
To:	Greg KH <gregkh@...e.de>
Cc:	anish <anish198519851985@...il.com>, devel@...verdev.osuosl.org,
	arnd@...db.de, lucas.demarchi@...fusion.mobi,
	linux-kernel@...r.kernel.org, jic23@....ac.uk,
	manuel.stahl@....fraunhofer.de
Subject: Re: [PATCH 1/2] staging: iio replaced kmalloc with local variables.

On Mon, 2011-06-06 at 14:55 -0700, Greg KH wrote:
> On Tue, Jun 07, 2011 at 12:37:37AM +0530, anish wrote:
> > From: anish kumar <anish198519851985@...il.com>
> > Replace kmalloc with local variables as it was un-necessary and
> > also removed the redudant code after this change.
> SPI data, like USB data, has to come from kmalloced data, not from the
> stack, or bad things can, and will, happen.

Perhaps just add a comment like:

+       u8 *tx = kmalloc(2, GFP_KERNEL);	/* can't be on stack */

It might be better to do a single kmalloc(4)
than 2 separate kmalloc(2)'s.


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