|
@@ -1045,7 +1045,8 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
|
|
|
* %pK cannot be used in IRQ context because its test
|
|
|
* for CAP_SYSLOG would be meaningless.
|
|
|
*/
|
|
|
- if (in_irq() || in_serving_softirq() || in_nmi()) {
|
|
|
+ if (kptr_restrict && (in_irq() || in_serving_softirq() ||
|
|
|
+ in_nmi())) {
|
|
|
if (spec.field_width == -1)
|
|
|
spec.field_width = default_width;
|
|
|
return string(buf, end, "pK-error", spec);
|