summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-06-22 18:16:08 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-06-28 06:28:08 +0300
commitcd5c91fe62519af6af238bbead32f2943a85c7de (patch)
treebab2ee9760298816e2ead23a77c67d928423a87c /drivers/crypto
parent9f38b678ffc4e2ccf167a1131c0403dc4f5e1bb7 (diff)
downloadlinux-cd5c91fe62519af6af238bbead32f2943a85c7de.tar.xz
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>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/qat/qat_common/adf_ctl_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/qat/qat_common/adf_ctl_drv.c b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
index 96b437bfe3de..6f64aa693146 100644
--- a/drivers/crypto/qat/qat_common/adf_ctl_drv.c
+++ b/drivers/crypto/qat/qat_common/adf_ctl_drv.c
@@ -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);
break;
default:
- pr_err("QAT: Invalid ioctl\n");
+ pr_err_ratelimited("QAT: Invalid ioctl %d\n", cmd);
ret = -EFAULT;
break;
}