mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-10 07:00:48 +00:00
crypto: qat - ratelimit invalid ioctl message and print the invalid cmd
Currently incorrect QAT ioctls can spam the kernel log with error messages of the form "QAT: Invalid ioctl" if a userspace program uses the wrong ioctl command. Quench the messages by ratelimiting them and also print the invalid command being used as that is useful to know. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
9f38b678ff
commit
cd5c91fe62
@ -406,7 +406,7 @@ static long adf_ctl_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
|
|||||||
ret = adf_ctl_ioctl_get_status(fp, cmd, arg);
|
ret = adf_ctl_ioctl_get_status(fp, cmd, arg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
pr_err("QAT: Invalid ioctl\n");
|
pr_err_ratelimited("QAT: Invalid ioctl %d\n", cmd);
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user