* [PATCH] AF_UNIX: update locking comment
@ 2010-02-18 17:34 Stephen Hemminger
2010-02-18 22:12 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2010-02-18 17:34 UTC (permalink / raw)
To: David Miller; +Cc: netdev
The lock used in unix_state_lock() is a spin_lock not reader-writer.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/unix/af_unix.c 2010-02-18 09:29:38.948513483 -0800
+++ b/net/unix/af_unix.c 2010-02-18 09:32:18.584389536 -0800
@@ -144,7 +144,7 @@ static inline void unix_set_secdata(stru
/*
* SMP locking strategy:
* hash table is protected with spinlock unix_table_lock
- * each socket state is protected by separate rwlock.
+ * each socket state is protected by separate spin lock.
*/
static inline unsigned unix_hash_fold(__wsum n)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] AF_UNIX: update locking comment
2010-02-18 17:34 [PATCH] AF_UNIX: " Stephen Hemminger
@ 2010-02-18 22:12 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-02-18 22:12 UTC (permalink / raw)
To: shemminger; +Cc: netdev
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Thu, 18 Feb 2010 09:34:23 -0800
> The lock used in unix_state_lock() is a spin_lock not reader-writer.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] af_unix: update locking comment
@ 2011-03-13 20:11 dbaluta
2011-03-14 22:26 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: dbaluta @ 2011-03-13 20:11 UTC (permalink / raw)
To: davem; +Cc: eric.dumazet, netdev, Daniel Baluta, Daniel Baluta
From: Daniel Baluta <daniel.baluta@gmail.com>
We latch our state using a spinlock not a r/w kind of lock.
Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
---
net/unix/af_unix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index de87018..ef70615 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1124,7 +1124,7 @@ restart:
/* Latch our state.
- It is tricky place. We need to grab write lock and cannot
+ It is tricky place. We need to grab our state lock and cannot
drop lock on peer. It is dangerous because deadlock is
possible. Connect to self case and simultaneous
attempt to connect are eliminated by checking socket
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] af_unix: update locking comment
2011-03-13 20:11 [PATCH] af_unix: update locking comment dbaluta
@ 2011-03-14 22:26 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-03-14 22:26 UTC (permalink / raw)
To: dbaluta; +Cc: eric.dumazet, netdev, daniel.baluta
From: dbaluta@ixiacom.com
Date: Sun, 13 Mar 2011 22:11:46 +0200
> We latch our state using a spinlock not a r/w kind of lock.
>
> Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-14 22:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 20:11 [PATCH] af_unix: update locking comment dbaluta
2011-03-14 22:26 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2010-02-18 17:34 [PATCH] AF_UNIX: " Stephen Hemminger
2010-02-18 22:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).