Skip to contentSkip to conversation

alpha: osf_sys: reduce kernel log spamming on invalid osf_mount call typenr

PATCH In review Colin Ian King 2 participants 2 messages Dec 13, 2021 – Feb 26, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 alpha: osf_sys: reduce kernel log spamming on invalid osf_mount call typenr

Calling the osf_mount system call with an invalid typenr value will spam the kernel log with error messages. Reduce the spamming by making it a ratelimited printk. Issue found when exercising with the stress-ng enosys system call stressor.

---
 arch/alpha/kernel/osf_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/osf_sys.c +1 -1
index 8bbeebb73cf0..2367a385d726 100644
@@ -521,7 +521,7 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path,
 		break;
 	default:
 		retval = -EINVAL;
-		printk("osf_mount(%ld, %x)\n", typenr, flag);
+		printk_ratelimited("osf_mount(%ld, %x)\n", typenr, flag);
 	}
 
 	return retval;
Signature · 1 line
2.33.1
maintainer
#1 lore raw
Quoted 25 lines · Colin Ian King

Calling the osf_mount system call with an invalid typenr value will spam the kernel log with error messages. Reduce the spamming by making it a ratelimited printk. Issue found when exercising with the stress-ng enosys system call stressor.

---
 arch/alpha/kernel/osf_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/osf_sys.c +1 -2
index 8bbeebb73cf0..2367a385d726 100644
@@ -521,7 +521,7 @@ SYSCALL_DEFINE4(osf_mount, unsigned long, typenr, const char __user *, path,
                break;
        default:
                retval = -EINVAL;
-               printk("osf_mount(%ld, %x)\n", typenr, flag);
+               printk_ratelimited("osf_mount(%ld, %x)\n", typenr, flag);
        }
 
        return retval;
--
Quoted 2 lines

2.33.1

Thanks for the patch! This was included in my pull request today and is now upstream in Linus' tree.