lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c57a066-d21e-4e54-b729-d61051191168@linaro.org>
Date: Fri, 3 May 2024 11:54:10 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Johan Hovold <johan@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/52] USB: serial: store owner from modules with
 usb_serial_register_drivers()

On 15/04/2024 10:56, Johan Hovold wrote:
> On Thu, Mar 28, 2024 at 11:05:39PM +0100, Krzysztof Kozlowski wrote:
>> Modules registering driver with usb_serial_register_drivers() might
>> forget to set .owner field.  The field is used by some of other kernel
>> parts for reference counting (try_module_get()), so it is expected that
>> drivers will set it.
>>
>> Solve the problem by moving this task away from the drivers to the core
>> amba bus code, just like we did for platform_driver in
> 
> "amba"
> 
>> commit 9447057eaff8 ("platform_device: use a macro instead of
>> platform_driver_register").
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>> ---
>>  drivers/usb/serial/usb-serial.c | 12 +++++++-----
>>  include/linux/usb/serial.h      |  7 +++++--
>>  2 files changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
>> index f1e91eb7f8a4..a659f2096a1a 100644
>> --- a/drivers/usb/serial/usb-serial.c
>> +++ b/drivers/usb/serial/usb-serial.c
>> @@ -1459,17 +1459,18 @@ static void usb_serial_deregister(struct usb_serial_driver *device)
>>  }
>>  
>>  /**
>> - * usb_serial_register_drivers - register drivers for a usb-serial module
>> + * __usb_serial_register_drivers - register drivers for a usb-serial module
>>   * @serial_drivers: NULL-terminated array of pointers to drivers to be registered
>> + * @owner: owning module/driver
> 
> Just "module"

Ack for both.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ