[PATCH v1 3/5] j1939: add comments for locks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
 net/can/j1939/j1939-priv.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/can/j1939/j1939-priv.h b/net/can/j1939/j1939-priv.h
index feb6bc64db0a..5881e4c86b44 100644
--- a/net/can/j1939/j1939-priv.h
+++ b/net/can/j1939/j1939-priv.h
@@ -81,8 +81,10 @@ struct j1939_priv {
 
 	unsigned int tp_max_packet_size;
 
-	struct list_head j1939_socks;
+	/* lock for j1939_socks list */
 	spinlock_t j1939_socks_lock;
+	struct list_head j1939_socks;
+
 	struct kref rx_kref;
 };
 
@@ -226,6 +228,7 @@ struct j1939_session {
 	struct list_head active_session_list_entry;
 	struct list_head sk_session_queue_entry;
 	struct kref kref;
+	/* session lock */
 	spinlock_t lock;
 	struct sock *sk;
 
@@ -306,6 +309,7 @@ struct j1939_sock {
 	atomic_t skb_pending;
 	wait_queue_head_t waitq;
 
+	/* lock for the sk_session_queue list */
 	spinlock_t sk_session_queue_lock;
 	struct list_head sk_session_queue;
 };
-- 
2.20.1




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux