SCTP: Update RCU handling during the ADD-IP case
After learning more about rcu, it looks like the ADD-IP hadling doesn't need to call call_rcu_bh. All the rcu critical sections use rcu_read_lock, so using call_rcu_bh is wrong here. Now, restore the local_bh_disable() code blocks and use normal call_rcu() calls. Also restore the missing return statement. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
This commit is contained in:
@ -2953,13 +2953,17 @@ static int sctp_asconf_param_success(struct sctp_association *asoc,
|
||||
/* This is always done in BH context with a socket lock
|
||||
* held, so the list can not change.
|
||||
*/
|
||||
local_bh_disable();
|
||||
list_for_each_entry(saddr, &bp->address_list, list) {
|
||||
if (sctp_cmp_addr_exact(&saddr->a, &addr))
|
||||
saddr->use_as_src = 1;
|
||||
}
|
||||
local_bh_enable();
|
||||
break;
|
||||
case SCTP_PARAM_DEL_IP:
|
||||
retval = sctp_del_bind_addr(bp, &addr, call_rcu_bh);
|
||||
local_bh_disable();
|
||||
retval = sctp_del_bind_addr(bp, &addr);
|
||||
local_bh_enable();
|
||||
list_for_each(pos, &asoc->peer.transport_addr_list) {
|
||||
transport = list_entry(pos, struct sctp_transport,
|
||||
transports);
|
||||
|
Reference in New Issue
Block a user