Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com
Date: Thu, 21 May 2015 21:51:19 -0700

 From: Eric Dumazet eduma...@google.com
 
 Taking socket spinlock in tcp_get_info() can deadlock, as
 inet_diag_dump_icsk() holds the hashinfo-ehash_locks[i],
 while packet processing can use the reverse locking order.
 
 We could avoid this locking for TCP_LISTEN states, but lockdep would
 certainly get confused as all TCP sockets share same lockdep classes.
 ...
 Lets use u64_sync infrastructure instead. As a bonus, 64bit
 arches get optimized, as these are nop for them.
 
 Fixes: 0df48c26d841 (tcp: add tcpi_bytes_acked to tcp_info)
 Signed-off-by: Eric Dumazet eduma...@google.com

This bug exists in 'net' so I've applied it there.

Thanks Eric.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread Eric Dumazet
On Fri, 2015-05-22 at 10:56 -0700, Eric Dumazet wrote:
 On Fri, 2015-05-22 at 13:50 -0400, David Miller wrote:
 
  This bug exists in 'net' so I've applied it there.
  
  Thanks Eric.
 
 Oh thats right, sorry for this, as you'll probably have a conflict when
 merging net into net-next.

Also I am wondering if not explicitly include linux/u64_stats_sync.h
could break one arch...



--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com
Date: Fri, 22 May 2015 11:08:39 -0700

 On Fri, 2015-05-22 at 11:03 -0700, Eric Dumazet wrote:
 
 Also I am wondering if not explicitly include linux/u64_stats_sync.h
 could break one arch...
 
 Sorry for the false alarm, we should be good because of snmp.h

Right.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread Eric Dumazet
On Fri, 2015-05-22 at 11:03 -0700, Eric Dumazet wrote:

 Also I am wondering if not explicitly include linux/u64_stats_sync.h
 could break one arch...

Sorry for the false alarm, we should be good because of snmp.h


--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread David Miller
From: Eric Dumazet eric.duma...@gmail.com
Date: Fri, 22 May 2015 10:56:36 -0700

 On Fri, 2015-05-22 at 13:50 -0400, David Miller wrote:
 
 This bug exists in 'net' so I've applied it there.
 
 Thanks Eric.
 
 Oh thats right, sorry for this, as you'll probably have a conflict when
 merging net into net-next.

I know, but thanks for the heads up.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH net-next] tcp: fix a potential deadlock in tcp_get_info()

2015-05-22 Thread Eric Dumazet
On Fri, 2015-05-22 at 13:50 -0400, David Miller wrote:

 This bug exists in 'net' so I've applied it there.
 
 Thanks Eric.

Oh thats right, sorry for this, as you'll probably have a conflict when
merging net into net-next.

Thanks.



--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html