Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Feb 2015 07:51:06 +0000
From:      "hselasky (Hans Petter Selasky)" <phabric-noreply@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   [Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests).
Message-ID:  <3f0b29bf7ce72ac8fc468ca9876b011a@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-vhk6ww63dvpj6egspuyt-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-vhk6ww63dvpj6egspuyt-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

hselasky added a comment.

Hi,

There is only one or two likely consumers of callout_init_rw() at the present moment, and one of them is:

./netinet6/nd6.c:		canceled = callout_stop(&ln->ln_timer_ch);
./netinet6/nd6.c:			canceled = callout_reset(&ln->ln_timer_ch, INT_MAX,
./netinet6/nd6.c:			canceled = callout_reset(&ln->ln_timer_ch, tick,
./netinet6/in6.c:	callout_init_rw(&lle->base.ln_timer_ch, &lle->base.lle_lock,

hiren: Is this box configured for IPv6 ?

static void
in_lltable_free(struct lltable *llt, struct llentry *lle)
{
        LLE_WUNLOCK(lle);
        LLE_LOCK_DESTROY(lle);
        free(lle, M_LLTABLE);
}

ln_lltable_free() does not drain the callout associated with it and I am not sure if we have a sleeping context for that. Even if the refcount is zero, it doesn't mean that the callback is finished using the RW mutex.

This is another example where we really need a "callout_drain_async_function()".

REVISION DETAIL
  https://reviews.freebsd.org/D1711

To: rrs, gnn, rwatson, lstewart, jhb, kostikbel, hselasky, adrian, imp, sbruno
Cc: hiren, jhb, kostikbel, emaste, delphij, neel, erj, freebsd-net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3f0b29bf7ce72ac8fc468ca9876b011a>