]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
pstore/ram: Avoid allocation and leak of platform data
authorKees Cook <keescook@chromium.org>
Sun, 20 Jan 2019 22:33:34 +0000 (14:33 -0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit42151010c1dba5ac5b92475e864dd5983a1c775b
treea6fa3af43c812e218f467a14a31cb4d98457a445
parentda460562359885707ae80c23afabb7e66a4647ce
pstore/ram: Avoid allocation and leak of platform data

BugLink: https://bugs.launchpad.net/bugs/1837477
commit 5631e8576a3caf606cdc375f97425a67983b420c upstream.

Yue Hu noticed that when parsing device tree the allocated platform data
was never freed. Since it's not used beyond the function scope, this
switches to using a stack variable instead.

Reported-by: Yue Hu <huyue2@yulong.com>
Fixes: 35da60941e44 ("pstore/ram: add Device Tree bindings")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/pstore/ram.c