diff options
Diffstat (limited to 'include/asm-generic/bug.h')
| -rw-r--r-- | include/asm-generic/bug.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index a7613e1b0c87..20561a60db9c 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
| @@ -75,9 +75,19 @@ struct bug_entry { | |||
| 75 | 75 | ||
| 76 | /* | 76 | /* |
| 77 | * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report | 77 | * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report |
| 78 | * significant issues that need prompt attention if they should ever | 78 | * significant kernel issues that need prompt attention if they should ever |
| 79 | * appear at runtime. Use the versions with printk format strings | 79 | * appear at runtime. |
| 80 | * to provide better diagnostics. | 80 | * |
| 81 | * Do not use these macros when checking for invalid external inputs | ||
| 82 | * (e.g. invalid system call arguments, or invalid data coming from | ||
| 83 | * network/devices), and on transient conditions like ENOMEM or EAGAIN. | ||
| 84 | * These macros should be used for recoverable kernel issues only. | ||
| 85 | * For invalid external inputs, transient conditions, etc use | ||
| 86 | * pr_err[_once/_ratelimited]() followed by dump_stack(), if necessary. | ||
| 87 | * Do not include "BUG"/"WARNING" in format strings manually to make these | ||
| 88 | * conditions distinguishable from kernel issues. | ||
| 89 | * | ||
| 90 | * Use the versions with printk format strings to provide better diagnostics. | ||
| 81 | */ | 91 | */ |
| 82 | #ifndef __WARN_TAINT | 92 | #ifndef __WARN_TAINT |
| 83 | extern __printf(3, 4) | 93 | extern __printf(3, 4) |
