提交 8404877e 编写于 作者: K Konrad Rzeszutek Wilk

xen/p2m/debugfs: Fix potential pointer exception.

We could be referencing the last + 1 element of level_name[]
array which would cause a pointer exception, because of the
initial setup of lvl=4.

[v1: No need to do this for type_name, pointed out by Ian Campbell]
Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 5e287830
......@@ -786,7 +786,7 @@ EXPORT_SYMBOL_GPL(m2p_find_override_pfn);
int p2m_dump_show(struct seq_file *m, void *v)
{
static const char * const level_name[] = { "top", "middle",
"entry", "abnormal" };
"entry", "abnormal", "error"};
static const char * const type_name[] = { "identity", "missing",
"pfn", "abnormal"};
#define TYPE_IDENTITY 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册