sctp: proc: protect bind_addr->address_list accesses with rcu_read_lock()
authorThomas Graf <tgraf@redhat.com>
Thu, 6 Dec 2012 09:25:04 +0000 (09:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Dec 2012 19:15:04 +0000 (14:15 -0500)
commit0b0fe913bf6d551642eb8892ed90be7358906379
treecd119f956cd2b9428a16836020a80772b877f18b
parent36f0ffa59175883bf2b01b38a60384314368aae9
sctp: proc: protect bind_addr->address_list accesses with rcu_read_lock()

address_list is protected via the socket lock or RCU. Since we don't want
to take the socket lock for each assoc we dump in procfs a RCU read-side
critical section must be entered.

V2: Skip local addresses marked as dead

Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Vlad Yasevich <vyasevic@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/proc.c