diff options
author | Jan Kara <jack@suse.cz> | 2019-11-06 10:52:10 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-11-06 10:52:10 +0100 |
commit | dae82c7fd0926840c832151f3258ba751f73d348 (patch) | |
tree | 5cdef8359f6cfb964919ffb0bfa36d2de60140b1 /arch/riscv/kernel/traps.c | |
parent | reiserfs: replace open-coded atomic_dec_and_mutex_lock() (diff) | |
parent | quota: Handle quotas without quota inodes in dquot_get_state() (diff) | |
download | linux-dae82c7fd0926840c832151f3258ba751f73d348.tar.xz linux-dae82c7fd0926840c832151f3258ba751f73d348.zip |
Pull series refactoring quota enabling and disabling code.
Diffstat (limited to 'arch/riscv/kernel/traps.c')
-rw-r--r-- | arch/riscv/kernel/traps.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c index 424eb72d56b1..93742df9067f 100644 --- a/arch/riscv/kernel/traps.c +++ b/arch/riscv/kernel/traps.c @@ -124,24 +124,24 @@ static inline unsigned long get_break_insn_length(unsigned long pc) asmlinkage void do_trap_break(struct pt_regs *regs) { -#ifdef CONFIG_GENERIC_BUG if (!user_mode(regs)) { enum bug_trap_type type; type = report_bug(regs->sepc, regs); switch (type) { - case BUG_TRAP_TYPE_NONE: - break; +#ifdef CONFIG_GENERIC_BUG case BUG_TRAP_TYPE_WARN: regs->sepc += get_break_insn_length(regs->sepc); - break; + return; case BUG_TRAP_TYPE_BUG: +#endif /* CONFIG_GENERIC_BUG */ + default: die(regs, "Kernel BUG"); } + } else { + force_sig_fault(SIGTRAP, TRAP_BRKPT, + (void __user *)(regs->sepc)); } -#endif /* CONFIG_GENERIC_BUG */ - - force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)(regs->sepc)); } #ifdef CONFIG_GENERIC_BUG |