bug.c (c13aca79ff3c4af5fd31a5b2743a90eba6e36a26) | bug.c (a44f71a9ab99b509fec9d5a9f5c222debd89934f) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 Generic support for BUG() 4 5 This respects the following config options: 6 7 CONFIG_BUG - emit BUG traps. Nothing happens without this. 8 CONFIG_GENERIC_BUG - enable this code. --- 167 unchanged lines hidden (view full) --- 176 177 /* 178 * Since this is the only store, concurrency is not an issue. 179 */ 180 bug->flags |= BUGFLAG_DONE; 181 } 182 } 183 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 Generic support for BUG() 4 5 This respects the following config options: 6 7 CONFIG_BUG - emit BUG traps. Nothing happens without this. 8 CONFIG_GENERIC_BUG - enable this code. --- 167 unchanged lines hidden (view full) --- 176 177 /* 178 * Since this is the only store, concurrency is not an issue. 179 */ 180 bug->flags |= BUGFLAG_DONE; 181 } 182 } 183 |
184 /* 185 * BUG() and WARN_ON() families don't print a custom debug message 186 * before triggering the exception handler, so we must add the 187 * "cut here" line now. WARN() issues its own "cut here" before the 188 * extra debugging message it writes before triggering the handler. 189 */ 190 if ((bug->flags & BUGFLAG_NO_CUT_HERE) == 0) 191 printk(KERN_DEFAULT CUT_HERE); 192 |
|
184 if (warning) { 185 /* this is a WARN_ON rather than BUG/BUG_ON */ 186 __warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs, 187 NULL); 188 return BUG_TRAP_TYPE_WARN; 189 } 190 | 193 if (warning) { 194 /* this is a WARN_ON rather than BUG/BUG_ON */ 195 __warn(file, line, (void *)bugaddr, BUG_GET_TAINT(bug), regs, 196 NULL); 197 return BUG_TRAP_TYPE_WARN; 198 } 199 |
191 printk(KERN_DEFAULT CUT_HERE); 192 | |
193 if (file) 194 pr_crit("kernel BUG at %s:%u!\n", file, line); 195 else 196 pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", 197 (void *)bugaddr); 198 199 return BUG_TRAP_TYPE_BUG; 200} --- 23 unchanged lines hidden --- | 200 if (file) 201 pr_crit("kernel BUG at %s:%u!\n", file, line); 202 else 203 pr_crit("Kernel BUG at %pB [verbose debug info unavailable]\n", 204 (void *)bugaddr); 205 206 return BUG_TRAP_TYPE_BUG; 207} --- 23 unchanged lines hidden --- |