]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Fix wrong memory allocation
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 4 Dec 2019 10:09:58 +0000 (11:09 +0100)
committerRichard Weinberger <richard@nod.at>
Thu, 16 Jan 2020 22:36:07 +0000 (23:36 +0100)
commitd1288b68dfb08181de0b6a881dc9a889e04ed58a
treef8102a5bb8fcbc6cc433d1b95d9b303eb21ca71c
parent6bf85250a4ef51eaaa83de8648b21bc9e47aaf2a
ubifs: Fix wrong memory allocation

In create_default_filesystem() when we allocate the idx node we must use
the idx_node_size we calculated just one line before, not tmp, which
contains completely other data.

Fixes: e59b948fd59d ("ubifs: Refactor create_default_filesystem()")
Cc: stable@vger.kernel.org # v4.20+
Reported-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Tested-by: Naga Sureshkumar Relli <nagasure@xilinx.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/sb.c