提交 8f3d137e 编写于 作者: J Jiri Slaby 提交者: Linus Torvalds

Char: mxser, ratelimit ioctl warning

The GET_MAJOR ioctl prints out a warning, make it ratelimited.
Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
Acked-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 bd673c7c
......@@ -1612,8 +1612,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册