]> git.baikalelectronics.ru Git - kernel.git/commit
pstore: don't OOPS when there are no ftrace zones
authorBrian Norris <briannorris@chromium.org>
Thu, 9 Feb 2017 06:44:44 +0000 (22:44 -0800)
committerKees Cook <keescook@chromium.org>
Thu, 9 Feb 2017 19:49:49 +0000 (11:49 -0800)
commit98fd2612bba87625d464b189f01aaeae6121e190
tree7b1fa5d524bd20873e8f5f977e0f4b98c047c4be
parentd54fb431ea18b35c099e4452a082dba80ccb78a3
pstore: don't OOPS when there are no ftrace zones

We'll OOPS in ramoops_get_next_prz() if the platform didn't ask for any
ftrace zones (i.e., cxt->fprzs will be NULL). Let's just skip this
entire FTRACE section if there's no 'fprzs'.

Regression seen on a coreboot/depthcharge-based Chromebook.

Fixes: 47766ecd8ede ("pstore: Merge per-CPU ftrace records into one")
Cc: Joel Fernandes <joelaf@google.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c