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

Commit 373d4d09 authored by Rusty Russell's avatar Rusty Russell
Browse files

taint: add explicit flag to show whether lock dep is still OK.



Fix up all callers as they were before, with make one change: an
unsigned module taints the kernel, but doesn't turn off lockdep.

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 64748a2c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,7 +186,7 @@ die_if_kernel(char * str, struct pt_regs *regs, long err, unsigned long *r9_15)
#endif
	printk("%s(%d): %s %ld\n", current->comm, task_pid_nr(current), str, err);
	dik_show_regs(regs, r9_15);
	add_taint(TAINT_DIE);
	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
	dik_show_trace((unsigned long *)(regs+1));
	dik_show_code((unsigned int *)regs->pc);

+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ static void oops_end(unsigned long flags, struct pt_regs *regs, int signr)

	bust_spinlocks(0);
	die_owner = -1;
	add_taint(TAINT_DIE);
	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
	die_nest_count--;
	if (!die_nest_count)
		/* Nest count reaches zero, release the lock. */
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ void die(const char *str, struct pt_regs *regs, int err)
		crash_kexec(regs);

	bust_spinlocks(0);
	add_taint(TAINT_DIE);
	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
	raw_spin_unlock_irq(&die_lock);
	oops_exit();

+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ void die(const char *str, struct pt_regs *regs, long err)
	show_regs_log_lvl(regs, KERN_EMERG);
	show_stack_log_lvl(current, regs->sp, regs, KERN_EMERG);
	bust_spinlocks(0);
	add_taint(TAINT_DIE);
	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
	spin_unlock_irq(&die_lock);

	if (in_interrupt())
+1 −1
Original line number Diff line number Diff line
@@ -225,7 +225,7 @@ int die(const char *str, struct pt_regs *regs, long err)
	do_show_stack(current, &regs->r30, pt_elr(regs));

	bust_spinlocks(0);
	add_taint(TAINT_DIE);
	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);

	spin_unlock_irq(&die.lock);

Loading