lkml.org 
[lkml]   [2021]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] devlink: Require devlink lock during device reload
On Sun, Oct 31, 2021 at 07:35:56PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> Devlink reload was implemented as a special command which does _SET_
> operation, but doesn't take devlink->lock, while recursive devlink
> calls that were part of .reload_up()/.reload_down() sequence took it.
>
> This fragile flow was possible due to holding a big devlink lock
> (devlink_mutex), which effectively stopped all devlink activities,
> even unrelated to reloaded devlink.
>
> So let's make sure that devlink reload behaves as other commands and
> use special nested locking primitives with a depth of 1. Such change
> opens us to a venue of removing devlink_mutex completely, while keeping
> devlink locking complexity in devlink.c.

Jakub/Dave, I will be mostly unavailable until later this week, but I
have applied this patch to our queue and can report testing results
tomorrow. I would appreciate it if you could hold off on applying it
until then.

Thanks

\
 
 \ /
  Last update: 2021-11-01 08:13    [W:0.080 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site