[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250801-usb-auth-v1-1-a59bfdf0293f@atmark-techno.com>
Date: Fri, 01 Aug 2025 16:52:02 +0900
From: Dominique Martinet <dominique.martinet@...ark-techno.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Dominique Martinet <dominique.martinet@...ark-techno.com>
Subject: [PATCH] USB: lower "Device is not authorized for usage" message to
info
This message is not a useful error in practice:
- when using tools such as usbguard, the message is always printed but
it does not presume anything regarding the actual device acceptance
(later 'authorized to connect' message is at info level, and not
displayed on console)
- this can be a source of flood if a usb device connection is flaky
- ... and it is only displayed as the result of an admin action
(modifying authorized_default), working as intended, so not likely
to be an error.
This is still useful to know when looking at usb devices problems, so
info seems appropriate for this class of messages together with the
later eventual authorized message.
Signed-off-by: Dominique Martinet <dominique.martinet@...ark-techno.com>
---
drivers/usb/core/driver.c | 4 ++--
drivers/usb/core/generic.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index c3177034b779eb9e7c61b941c358f615b33ce01d..69216c3951fd9613d9e10ecd75ace8e6fb888229 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -332,10 +332,10 @@ static int usb_probe_interface(struct device *dev)
return error;
if (udev->authorized == 0) {
- dev_err(&intf->dev, "Device is not authorized for usage\n");
+ dev_info(&intf->dev, "Device is not authorized for usage\n");
return error;
} else if (intf->authorized == 0) {
- dev_err(&intf->dev, "Interface %d is not authorized for usage\n",
+ dev_info(&intf->dev, "Interface %d is not authorized for usage\n",
intf->altsetting->desc.bInterfaceNumber);
return error;
}
diff --git a/drivers/usb/core/generic.c b/drivers/usb/core/generic.c
index 9c6ae5e1198bb2043d27e2f309a46f8ce512225f..a48994e11ef3d07ada3b945558fc8e0924d5ce54 100644
--- a/drivers/usb/core/generic.c
+++ b/drivers/usb/core/generic.c
@@ -243,7 +243,7 @@ int usb_generic_driver_probe(struct usb_device *udev)
* with the driver core and lets interface drivers bind to them.
*/
if (udev->authorized == 0)
- dev_err(&udev->dev, "Device is not authorized for usage\n");
+ dev_info(&udev->dev, "Device is not authorized for usage\n");
else {
c = usb_choose_configuration(udev);
if (c >= 0) {
---
base-commit: 89748acdf226fd1a8775ff6fa2703f8412b286c8
change-id: 20250801-usb-auth-bc88f7f1cb04
Best regards,
--
Dominique Martinet <dominique.martinet@...ark-techno.com>
Powered by blists - more mailing lists