drivers/mtd/onenand/: unacceptable stack usage
bunk at stusta.de
Thu Dec 15 19:55:05 EST 2005
In 2.6.15-rc, the following driver was added:
#define MAX_ONENAND_PAGESIZE (2048 + 64)
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;
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.
"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
More information about the linux-mtd