--- y/net/core/dst.c +++ x/net/core/dst.c @@ -164,6 +164,8 @@ void dst_dev_put(struct dst_entry *dst) } EXPORT_SYMBOL(dst_dev_put); +static void debug_dst_destroy(struct dst_entry *dst) { } + void dst_release(struct dst_entry *dst) { if (dst) { @@ -173,8 +175,11 @@ void dst_release(struct dst_entry *dst) if (WARN_ONCE(newrefcnt < 0, "dst_release underflow")) net_warn_ratelimited("%s: dst:%p refcnt:%d\n", __func__, dst, newrefcnt); - if (!newrefcnt) + if (!newrefcnt) { + if (dst->ops->destroy) + debug_dst_destroy(dst); call_rcu(&dst->rcu_head, dst_destroy_rcu); + } } } EXPORT_SYMBOL(dst_release);