Documentation: devlink: add a note about RTNL lock into locking section
authorJiri Pirko <jiri@nvidia.com>
Fri, 13 Oct 2023 12:10:28 +0000 (14:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Oct 2023 08:23:01 +0000 (09:23 +0100)
Add a note describing the locking order of taking RTNL lock with devlink
instance lock.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/devlink/index.rst

index 52e52a1b603dfdbc07969178823fd7834d441a51..2884ad243b54b4d3cb0b7017d065ff468d2ac0bf 100644 (file)
@@ -18,6 +18,10 @@ netlink commands.
 
 Drivers are encouraged to use the devlink instance lock for their own needs.
 
+Drivers need to be cautious when taking devlink instance lock and
+taking RTNL lock at the same time. Devlink instance lock needs to be taken
+first, only after that RTNL lock could be taken.
+
 Nested instances
 ----------------