diff options
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 79856c924525..2e34220d94cd 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1531,7 +1531,7 @@ no_hmac: | |||
1531 | /* Also, add the destination address. */ | 1531 | /* Also, add the destination address. */ |
1532 | if (list_empty(&retval->base.bind_addr.address_list)) { | 1532 | if (list_empty(&retval->base.bind_addr.address_list)) { |
1533 | sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1, | 1533 | sctp_add_bind_addr(&retval->base.bind_addr, &chunk->dest, 1, |
1534 | GFP_ATOMIC); | 1534 | GFP_ATOMIC); |
1535 | } | 1535 | } |
1536 | 1536 | ||
1537 | retval->next_tsn = retval->c.initial_tsn; | 1537 | retval->next_tsn = retval->c.initial_tsn; |
@@ -2613,22 +2613,16 @@ static int sctp_asconf_param_success(struct sctp_association *asoc, | |||
2613 | 2613 | ||
2614 | switch (asconf_param->param_hdr.type) { | 2614 | switch (asconf_param->param_hdr.type) { |
2615 | case SCTP_PARAM_ADD_IP: | 2615 | case SCTP_PARAM_ADD_IP: |
2616 | sctp_local_bh_disable(); | 2616 | /* This is always done in BH context with a socket lock |
2617 | sctp_write_lock(&asoc->base.addr_lock); | 2617 | * held, so the list can not change. |
2618 | list_for_each(pos, &bp->address_list) { | 2618 | */ |
2619 | saddr = list_entry(pos, struct sctp_sockaddr_entry, list); | 2619 | list_for_each_entry(saddr, &bp->address_list, list) { |
2620 | if (sctp_cmp_addr_exact(&saddr->a, &addr)) | 2620 | if (sctp_cmp_addr_exact(&saddr->a, &addr)) |
2621 | saddr->use_as_src = 1; | 2621 | saddr->use_as_src = 1; |
2622 | } | 2622 | } |
2623 | sctp_write_unlock(&asoc->base.addr_lock); | ||
2624 | sctp_local_bh_enable(); | ||
2625 | break; | 2623 | break; |
2626 | case SCTP_PARAM_DEL_IP: | 2624 | case SCTP_PARAM_DEL_IP: |
2627 | sctp_local_bh_disable(); | 2625 | retval = sctp_del_bind_addr(bp, &addr, call_rcu_bh); |
2628 | sctp_write_lock(&asoc->base.addr_lock); | ||
2629 | retval = sctp_del_bind_addr(bp, &addr); | ||
2630 | sctp_write_unlock(&asoc->base.addr_lock); | ||
2631 | sctp_local_bh_enable(); | ||
2632 | list_for_each(pos, &asoc->peer.transport_addr_list) { | 2626 | list_for_each(pos, &asoc->peer.transport_addr_list) { |
2633 | transport = list_entry(pos, struct sctp_transport, | 2627 | transport = list_entry(pos, struct sctp_transport, |
2634 | transports); | 2628 | transports); |