Messages in this thread | | | From | Dawson Engler <> | Subject | [CHECKER] deadlock in 2.5.62/net/sctp/input.c? | Date | Sat, 22 Mar 2003 01:50:21 -0800 (PST) |
| |
Hi All,
here's a potential locking cycle in 2.5.62/net/sctp/input.c. Confirmation/correction appreciated.
Thanks, Dawson
ERROR: 1 thread local-local deadlock. <sctp_hashbucket_t.lock>-><sctp_endpoint_common_t.addr_lock> occurred 2 times <sctp_endpoint_common_t.addr_lock>-><sctp_hashbucket_t.lock> occurred 2 times
depth = 2: net/sctp/input.c:__sctp_lookup_association:634 ->net/sctp/input.c:__sctp_lookup_association:634
hash = sctp_assoc_hashfn(laddr->v4.sin_port, paddr->v4.sin_port); head = &sctp_proto.assoc_hashbucket[hash]; read_lock(&head->lock); for (epb = head->chain; epb; epb = epb->next) { asoc = sctp_assoc(epb); transport = sctp_assoc_is_match(asoc, laddr, paddr);
->__sctp_lookup_association:637 ->end=net/sctp/associola.c:sctp_assoc_is_match:754:read_lock ->net/sctp/associola.c:sctp_assoc_is_match:754
sctp_read_lock(&asoc->base.addr_lock);
depth = 2: net/sctp/input.c:__sctp_rcv_lookup_endpoint:536 ->net/sctp/input.c:__sctp_rcv_lookup_endpoint:536 ->__sctp_rcv_lookup_endpoint:539 ->end=net/sctp/endpointola.c:sctp_endpoint_is_match:241:read_lock
While the readlocks are recursive, can be called in a place without *->base.addr_lock held (e.g., sctp_v4_err).
<sctp_endpoint_common_t.addr_lock>-><sctp_hashbucket_t.lock> = depth = 4: net/sctp/endpointola.c:sctp_endpoint_is_peeled_off:313 ->net/sctp/endpointola.c:sctp_endpoint_is_peeled_off:313 ->sctp_endpoint_is_peeled_off:317
sctp_read_lock(&ep->base.addr_lock); bp = &ep->base.bind_addr; list_for_each(pos, &bp->address_list) { addr = list_entry(pos, struct sockaddr_storage_list, list); if (sctp_has_association(&addr->a, paddr)) {
->net/sctp/input.c:sctp_has_association:675 ->sctp_lookup_association:662 ->end=__sctp_lookup_association:634:read_lock - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |