summaryrefslogtreecommitdiffstats
path: root/drivers/char/ramoops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ramoops.c')
-rw-r--r--drivers/char/ramoops.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/ramoops.c b/drivers/char/ramoops.c
index d3d63be2cd3..eeec5758f9c 100644
--- a/drivers/char/ramoops.c
+++ b/drivers/char/ramoops.c
@@ -68,6 +68,11 @@ static void ramoops_do_dump(struct kmsg_dumper *dumper,
char *buf, *buf_orig;
struct timeval timestamp;
+ if (reason != KMSG_DUMP_OOPS &&
+ reason != KMSG_DUMP_PANIC &&
+ reason != KMSG_DUMP_KEXEC)
+ return;
+
/* Only dump oopses if dump_oops is set */
if (reason == KMSG_DUMP_OOPS && !dump_oops)
return;