Skip to content

Commit

Permalink
sctp: remove the local_bh_disable/enable in sctp_endpoint_lookup_assoc
Browse files Browse the repository at this point in the history
sctp_endpoint_lookup_assoc is called in the protection of sock lock
there is no need to call local_bh_disable in this function. so remove
them.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Xin Long authored and David S. Miller committed Jan 5, 2016
1 parent b5eff71 commit c79c066
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions net/sctp/endpointola.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ struct sctp_endpoint *sctp_endpoint_is_match(struct sctp_endpoint *ep,
* We lookup the transport from hashtable at first, then get association
* through t->assoc.
*/
static struct sctp_association *__sctp_endpoint_lookup_assoc(
struct sctp_association *sctp_endpoint_lookup_assoc(
const struct sctp_endpoint *ep,
const union sctp_addr *paddr,
struct sctp_transport **transport)
Expand All @@ -342,21 +342,6 @@ static struct sctp_association *__sctp_endpoint_lookup_assoc(
return asoc;
}

/* Lookup association on an endpoint based on a peer address. BH-safe. */
struct sctp_association *sctp_endpoint_lookup_assoc(
const struct sctp_endpoint *ep,
const union sctp_addr *paddr,
struct sctp_transport **transport)
{
struct sctp_association *asoc;

local_bh_disable();
asoc = __sctp_endpoint_lookup_assoc(ep, paddr, transport);
local_bh_enable();

return asoc;
}

/* Look for any peeled off association from the endpoint that matches the
* given peer address.
*/
Expand Down

0 comments on commit c79c066

Please sign in to comment.