On Thu, 2023-07-06 at 18:29:08 UTC, William Zhang wrote: > When the oob buffer length is not in multiple of words, the oob write > function does out-of-bounds read on the oob source buffer at the last > iteration. Fix that by always checking length limit on the oob buffer > read and fill with 0xff when reaching the end of the buffer to the oob > registers. > > Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") > Signed-off-by: William Zhang <william.zhang@xxxxxxxxxxxx> > Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx> > Cc: stable@xxxxxxxxxxxxxxx Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks. Miquel