forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
316b003540
commit
5bc117a27f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -16,6 +16,7 @@ struct vbg_dev;
|
|||
__printf(1, 2) void vbg_info(const char *fmt, ...);
|
||||
__printf(1, 2) void vbg_warn(const char *fmt, ...);
|
||||
__printf(1, 2) void vbg_err(const char *fmt, ...);
|
||||
__printf(1, 2) void vbg_err_ratelimited(const char *fmt, ...);
|
||||
|
||||
/* Only use backdoor logging for non-dynamic debug builds */
|
||||
#if defined(DEBUG) && !defined(CONFIG_DYNAMIC_DEBUG)
|
||||
|
|
Loading…
Reference in New Issue
Block a user