Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mtd/fixes-for-4.14-rc3' of git://git.infradead.org/linux-mtd

Pull mtd fixes from Boris Brezillon:

- Fix partition alignment check in mtdcore.c

- Fix a buffer overflow in the Atmel NAND driver

* tag 'mtd/fixes-for-4.14-rc3' of git://git.infradead.org/linux-mtd:
mtd: nand: atmel: fix buffer overflow in atmel_pmecc_user
mtd: Fix partition alignment check on multi-erasesize devices

+9 -1
+8
drivers/mtd/mtdpart.c
··· 581 581 slave->mtd.erasesize = parent->erasesize; 582 582 } 583 583 584 + /* 585 + * Slave erasesize might differ from the master one if the master 586 + * exposes several regions with different erasesize. Adjust 587 + * wr_alignment accordingly. 588 + */ 589 + if (!(slave->mtd.flags & MTD_NO_ERASE)) 590 + wr_alignment = slave->mtd.erasesize; 591 + 584 592 tmp = slave->offset; 585 593 remainder = do_div(tmp, wr_alignment); 586 594 if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
+1 -1
drivers/mtd/nand/atmel/pmecc.c
··· 363 363 size += (req->ecc.strength + 1) * sizeof(u16); 364 364 /* Reserve space for mu, dmu and delta. */ 365 365 size = ALIGN(size, sizeof(s32)); 366 - size += (req->ecc.strength + 1) * sizeof(s32); 366 + size += (req->ecc.strength + 1) * sizeof(s32) * 3; 367 367 368 368 user = kzalloc(size, GFP_KERNEL); 369 369 if (!user)