public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/mtd/onenand/: unacceptable stack usage
@ 2005-12-16  0:55 Adrian Bunk
  2005-12-16  2:17 ` Kyungmin Park
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2005-12-16  0:55 UTC (permalink / raw)
  To: Kyungmin Park
  Cc: dwmw2, linux-mtd, Linus Torvalds, Andrew Morton, linux-kernel

In 2.6.15-rc, the following driver was added:


include/linux/mtd/onenand.h:
#define MAX_ONENAND_PAGESIZE        (2048 + 64)


drivers/mtd/onenand/onenand_base.c:
static int onenand_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
        unsigned long count, loff_t to, size_t *retlen,
        u_char *eccbuf, struct nand_oobinfo *oobsel)
{
        struct onenand_chip *this = mtd->priv;
        unsigned char buffer[MAX_ONENAND_PAGESIZE], *pbuf;


drivers/mtd/onenand/onenand_bbt.c:
static inline int onenand_memory_bbt (struct mtd_info *mtd, struct nand_bbt_descr *bd)
{
        unsigned char data_buf[MAX_ONENAND_PAGESIZE];


These are variables on the stack that are > 2kB which is not acceptable 
since the complete stack might be only 4kB.


Please either fix this before 2.6.15 or mark the MTD_ONENAND driver as 
BROKEN until it's fixed.


TIA
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-04  1:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-16  0:55 drivers/mtd/onenand/: unacceptable stack usage Adrian Bunk
2005-12-16  2:17 ` Kyungmin Park
2006-01-04  0:54   ` Andrew Morton
2006-01-04  1:03     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox