diff options
author | Hans de Goede <hdegoede@redhat.com> | 2020-07-09 14:08:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-10 13:45:32 +0200 |
commit | 5bc117a27fd044bd5ddeb8ab22c58976bf01b50d (patch) | |
tree | 1ed863949b3202b54e6cf4d59a0e36762a3d1a73 /drivers/virt | |
parent | 316b0035402f05fe9e9e5334d1ff65dae285cb7c (diff) | |
download | linux-5bc117a27fd044bd5ddeb8ab22c58976bf01b50d.tar.bz2 |
virt: vbox: Log unknown ioctl requests as error
Every now and then upstream adds new ioctls without notifying us,
log unknown ioctl requests as an error to catch these.
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20200709120858.63928-8-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/virt')
-rw-r--r-- | drivers/virt/vboxguest/vboxguest_core.c | 2 | ||||
-rw-r--r-- | drivers/virt/vboxguest/vboxguest_utils.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/virt/vboxguest/vboxguest_core.c b/drivers/virt/vboxguest/vboxguest_core.c index ffd76b949276..c5dfcd42fd07 100644 --- a/drivers/virt/vboxguest/vboxguest_core.c +++ b/drivers/virt/vboxguest/vboxguest_core.c @@ -1739,7 +1739,7 @@ int vbg_core_ioctl(struct vbg_session *session, unsigned int req, void *data) return vbg_ioctl_log(data); } - vbg_debug("VGDrvCommonIoCtl: Unknown req %#08x\n", req); + vbg_err_ratelimited("Userspace made an unknown ioctl req %#08x\n", req); return -ENOTTY; } diff --git a/drivers/virt/vboxguest/vboxguest_utils.c b/drivers/virt/vboxguest/vboxguest_utils.c index 7396187ee32a..ea05af41ec69 100644 --- a/drivers/virt/vboxguest/vboxguest_utils.c +++ b/drivers/virt/vboxguest/vboxguest_utils.c @@ -59,6 +59,7 @@ EXPORT_SYMBOL(name) VBG_LOG(vbg_info, pr_info); VBG_LOG(vbg_warn, pr_warn); VBG_LOG(vbg_err, pr_err); +VBG_LOG(vbg_err_ratelimited, pr_err_ratelimited); #if defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG) VBG_LOG(vbg_debug, pr_debug); #endif |