public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Char: mxser, ratelimit ioctl warning
@ 2008-07-25  8:39 Jiri Slaby
  0 siblings, 0 replies; only message in thread
From: Jiri Slaby @ 2008-07-25  8:39 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Jiri Slaby, Alan Cox

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

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
---
 drivers/char/mxser.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 48676ad..3c1ecd5 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -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:
-- 
1.5.6.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-25  8:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-25  8:39 [PATCH 1/1] Char: mxser, ratelimit ioctl warning Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox