Re: [patch net-next v2 09/12] devlink: protect devlink param list by instance lock

From
Ido Schimmel <idosch@nvidia.com>
Date
2023-01-26 09:28:53
Reply to
Jiri Pirko, 2023-01-26
On Thu, Jan 26, 2023 at 08:58:35AM +0100, Jiri Pirko wrote:
From: Jiri Pirko <redacted>

Commit 1d18bb1a4ddd ("devlink: allow registering parameters after
the instance") as the subject implies introduced possibility to register
devlink params even for already registered devlink instance. This is a
bit problematic, as the consistency or params list was originally
secured by the fact it is static during devlink lifetime. So in order to
protect the params list, take devlink instance lock during the params
operations. Introduce unlocked function variants and use them in drivers
in locked context. Put lock assertions to appropriate places.

Signed-off-by: Jiri Pirko <redacted>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Thread (17 messages) 17 messages, 4 authors, last reply 2023-01-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help