提交 d8991f51 编写于 作者: J Joel Fernandes 提交者: Kees Cook

pstore: Warn on PSTORE_TYPE_PMSG using deprecated function

PMSG now uses ramoops_pstore_write_buf_user() instead of ...write_buf().
Print a ratelimited warning if gets accidentally called.
Signed-off-by: NJoel Fernandes <joelaf@google.com>
[kees: adjusted commit log and added -EINVAL return]
Signed-off-by: NKees Cook <keescook@chromium.org>
上级 10970449
......@@ -288,10 +288,8 @@ static int notrace ramoops_pstore_write_buf(enum pstore_type_id type,
persistent_ram_write(cxt->fprz, buf, size);
return 0;
} else if (type == PSTORE_TYPE_PMSG) {
if (!cxt->mprz)
return -ENOMEM;
persistent_ram_write(cxt->mprz, buf, size);
return 0;
pr_warn_ratelimited("PMSG shouldn't call %s\n", __func__);
return -EINVAL;
}
if (type != PSTORE_TYPE_DMESG)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册