]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
pstore: Properly assign mem_type property
authorLuca Stefani <luca@osomprivacy.com>
Thu, 22 Dec 2022 13:10:49 +0000 (14:10 +0100)
committerKees Cook <keescook@chromium.org>
Fri, 23 Dec 2022 18:34:25 +0000 (10:34 -0800)
commitbeca3e311a49cd3c55a056096531737d7afa4361
tree8a921d440f1fcb64f4caeef3414c43e590f84729
parent2f4fec5943407318b9523f01ce1f5d668c028332
pstore: Properly assign mem_type property

If mem-type is specified in the device tree
it would end up overriding the record_size
field instead of populating mem_type.

As record_size is currently parsed after the
improper assignment with default size 0 it
continued to work as expected regardless of the
value found in the device tree.

Simply changing the target field of the struct
is enough to get mem-type working as expected.

Fixes: 9d843e8fafc7 ("pstore: Add mem_type property DT parsing support")
Cc: stable@vger.kernel.org
Signed-off-by: Luca Stefani <luca@osomprivacy.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20221222131049.286288-1-luca@osomprivacy.com
fs/pstore/ram.c