Skip to content

Commit

Permalink
EDAC/mc: Call edac_inc_ue_error() before panic
Browse files Browse the repository at this point in the history
[ Upstream commit e9ff663 ]

By calling edac_inc_ue_error() before panic, we get a correct UE error
count for core dump analysis.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20200610065846.3626-2-zhenzhong.duan@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zhenzhong Duan authored and gregkh committed Sep 3, 2020
1 parent ec24c53 commit 7d60c77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/edac/edac_mc.c
Expand Up @@ -950,6 +950,8 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
e->other_detail);
}

edac_inc_ue_error(e);

if (edac_mc_get_panic_on_ue()) {
panic("UE %s%son %s (%s page:0x%lx offset:0x%lx grain:%ld%s%s)\n",
e->msg,
Expand All @@ -959,8 +961,6 @@ static void edac_ue_error(struct edac_raw_error_desc *e)
*e->other_detail ? " - " : "",
e->other_detail);
}

edac_inc_ue_error(e);
}

static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan)
Expand Down

0 comments on commit 7d60c77

Please sign in to comment.