Skip to contentSkip to conversation

Char: mxser, ratelimit ioctl warning

PATCH New Jiri Slaby 1 participant 1 message Jul 25, 2008

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 Char: mxser, ratelimit ioctl warning

Get major ioctl prints out a warning, make it ratelimited.

---
 drivers/char/mxser.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
drivers/char/mxser.c +4 -2
index 48676ad..3c1ecd5 100644
@@ -1631,8 +1631,10 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
 
 	switch (cmd) {
 	case MOXA_GET_MAJOR:
-		printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl %x, fix "
-				"your userspace\n", current->comm, cmd);
+		if (printk_ratelimit())
+			printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl "
+					"%x (GET_MAJOR), fix your userspace\n",
+					current->comm, cmd);
 		return put_user(ttymajor, (int __user *)argp);
 
 	case MOXA_CHKPORTENABLE:
Signature · 1 line
1.5.6.2