Skip to content

Commit

Permalink
xen/p2m/debugfs: Fix potential pointer exception.
Browse files Browse the repository at this point in the history
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: Konrad Rzeszutek Wilk <[email protected]>
  • Loading branch information
konradwilk committed Oct 19, 2011
1 parent 5e28783 commit 8404877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/xen/p2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8404877

Please sign in to comment.