Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 30b444b2 authored by Syed Rameez Mustafa's avatar Syed Rameez Mustafa
Browse files

ARM: Allow panic on division by zero in the kernel



Division by zero errors in the kernel currently trigger warnings.
Allow panic on these errors so that we can catch the problem closer
to its source.

Change-Id: Id5fed71b74cd37874ae857a8105455d7561c782d
Signed-off-by: default avatarSyed Rameez Mustafa <rameezmustafa@codeaurora.org>
parent a8f114cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/bug.h>

#include <linux/atomic.h>
#include <asm/cacheflush.h>
@@ -784,6 +785,7 @@ void __pgd_error(const char *file, int line, pgd_t pgd)
asmlinkage void __div0(void)
{
	printk("Division by zero in kernel.\n");
	BUG_ON(PANIC_CORRUPTION);
	dump_stack();
}
EXPORT_SYMBOL(__div0);