[patch net-next v3 6/7] Documentation: devlink: add a note about RTNL lock into locking section

From
Jiri Pirko <jiri@resnulli.us>
Date
2023-10-13 12:10:44
Reply to
Jiri Pirko, 2023-10-13
From: Jiri Pirko <redacted>

Add a note describing the locking order of taking RTNL lock with devlink
instance lock.

Signed-off-by: Jiri Pirko <redacted>
---
v2->v3:
- new patch
---
 Documentation/networking/devlink/index.rst | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/Documentation/networking/devlink/index.rst b/Documentation/networking/devlink/index.rst
index 52e52a1b603d..2884ad243b54 100644
--- a/Documentation/networking/devlink/index.rst
+++ b/Documentation/networking/devlink/index.rst
@@ -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
 ----------------
 
-- 
2.41.0
Thread (16 messages) 16 messages, 3 authors, last reply 2023-10-18
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