[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150522.135042.1383929510137041615.davem@redhat.com>
Date: Fri, 22 May 2015 13:50:42 -0400 (EDT)
From: David Miller <davem@...hat.com>
To: eric.dumazet@...il.com
Cc: mleitner@...hat.com, edumazet@...gle.com, netdev@...r.kernel.org,
ycheng@...gle.com, mattmathis@...gle.com, cgallek@...gle.com,
kafai@...com
Subject: Re: [PATCH net-next] tcp: fix a potential deadlock in
tcp_get_info()
From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 21 May 2015 21:51:19 -0700
> From: Eric Dumazet <edumazet@...gle.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 <edumazet@...gle.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists