Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Herbert Xu
cd5c91fe 9f38b678

+1 -1
+1 -1
drivers/crypto/qat/qat_common/adf_ctl_drv.c
··· 406 406 ret = adf_ctl_ioctl_get_status(fp, cmd, arg); 407 407 break; 408 408 default: 409 - pr_err("QAT: Invalid ioctl\n"); 409 + pr_err_ratelimited("QAT: Invalid ioctl %d\n", cmd); 410 410 ret = -EFAULT; 411 411 break; 412 412 }