aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorye xingchen <[email protected]>2022-10-11 02:48:31 +0000
committerPetr Mladek <[email protected]>2022-10-18 15:04:05 +0200
commit66283a8f49c0cd9fd093d7e1c093825a0511baeb (patch)
tree9ea087bc6cb33b4ed08fe365b75389edd726372a
parentb520410654103086ccc0d339c0ff645d4c4dd697 (diff)
vsprintf: replace in_irq() with in_hardirq()
Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq(). Signed-off-by: ye xingchen <[email protected]> Reviewed-by: Sergey Senozhatsky <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
-rw-r--r--lib/vsprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 24f37bab8bc1..5b0611c00956 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -866,7 +866,7 @@ char *restricted_pointer(char *buf, char *end, const void *ptr,
* kptr_restrict==1 cannot be used in IRQ context
* because its test for CAP_SYSLOG would be meaningless.
*/
- if (in_irq() || in_serving_softirq() || in_nmi()) {
+ if (in_hardirq() || in_serving_softirq() || in_nmi()) {
if (spec.field_width == -1)
spec.field_width = 2 * sizeof(ptr);
return error_string(buf, end, "pK-error", spec);