Skip to content

Commit 2b36947

Browse files
committed
Merge tag 'pstore-v4.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull pstore fix from Kees Cook: "Fix pstore regression (boot Oops) when ftrace disabled, from Brian Norris" * tag 'pstore-v4.10-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: don't OOPS when there are no ftrace zones
2 parents 99378fd + 8672aed commit 2b36947

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/pstore/ram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static ssize_t ramoops_pstore_read(u64 *id, enum pstore_type_id *type,
280280
1, id, type, PSTORE_TYPE_PMSG, 0);
281281

282282
/* ftrace is last since it may want to dynamically allocate memory. */
283-
if (!prz_ok(prz)) {
283+
if (!prz_ok(prz) && cxt->fprzs) {
284284
if (!(cxt->flags & RAMOOPS_FLAG_FTRACE_PER_CPU)) {
285285
prz = ramoops_get_next_prz(cxt->fprzs,
286286
&cxt->ftrace_read_cnt, 1, id, type,

0 commit comments

Comments
 (0)