Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f3d137e authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds
Browse files

Char: mxser, ratelimit ioctl warning



The GET_MAJOR ioctl prints out a warning, make it ratelimited.

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Acked-by: default avatarAlan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bd673c7c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1612,8 +1612,10 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)


	switch (cmd) {
	switch (cmd) {
	case MOXA_GET_MAJOR:
	case MOXA_GET_MAJOR:
		printk(KERN_WARNING "mxser: '%s' uses deprecated ioctl %x, fix "
		if (printk_ratelimit())
				"your userspace\n", current->comm, cmd);
			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);
		return put_user(ttymajor, (int __user *)argp);


	case MOXA_CHKPORTENABLE:
	case MOXA_CHKPORTENABLE: