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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jul 2022 13:00:27 +0200
From:   Jiri Pirko <>
To:     Ido Schimmel <>
Subject: Re: [patch net-next v2 01/12] net: devlink: make sure that
 devlink_try_get() works with valid pointer during xarray iteration

Wed, Jul 20, 2022 at 09:45:26AM CEST, wrote:
>On Tue, Jul 19, 2022 at 08:48:36AM +0200, Jiri Pirko wrote:
>> From: Jiri Pirko <>
>> Remove dependency on devlink_mutex during devlinks xarray iteration.
>Missing motivation... Need to explain that devlink_mutex is held
>throughout every user space command and that while issuing a reload and
>registering / unregistering auxiliary devlink instances we will
>deadlock on this mutex.


>> The devlinks xarray consistency is ensured by internally by xarray.


>> There is a reference taken when working with devlink using
>> devlink_try_get(). But there is no guarantee that devlink pointer
>> picked during xarray iteration is not freed before devlink_try_get()
>> is called.
>> Make sure that devlink_try_get() works with valid pointer.
>> Achieve it by:
>> 1) Splitting devlink_put() so the completion is sent only
>>    after grace period. Completion unblocks the devlink_unregister()
>>    routine, which is followed-up by devlink_free()
>> 2) Iterate the devlink xarray holding RCU read lock.
>> Signed-off-by: Jiri Pirko <>

Powered by blists - more mailing lists