[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1216975190-6531-1-git-send-email-jirislaby@gmail.com>
Date: Fri, 25 Jul 2008 10:39:50 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: [PATCH 1/1] Char: mxser, ratelimit ioctl warning
Get major ioctl prints out a warning, make it ratelimited.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Alan Cox <alan@...rguk.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists