]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: move rcu_read_lock from __sctp_lookup_association to sctp_lookup_association
authorXin Long <lucien.xin@gmail.com>
Mon, 15 Feb 2016 06:28:03 +0000 (14:28 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Feb 2016 20:41:54 +0000 (15:41 -0500)
commit52041fea30a19ba60ad5cc37bea0b2ba2e00ba3c
tree9215761a2e50d904ae301f366deea5aa4d2da6f0
parent323e41793f5ea27811e8b05d10bc5e3d6206c624
sctp: move rcu_read_lock from __sctp_lookup_association to sctp_lookup_association

__sctp_lookup_association() is only invoked by sctp_v4_err() and
sctp_rcv(), both which run on the rx BH, and it has been protected
by rcu_read_lock [see ip_local_deliver_finish() / ipv6_rcv()].

So we can move it to sctp_lookup_association, only let
sctp_lookup_association use rcu_read_lock.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/input.c