Author: melifaro
Date: Thu May 28 07:23:27 2020
New Revision: 361571
URL: https://svnweb.freebsd.org/changeset/base/361571

Log:
  Unlock rtentry before calling for epoch(9) destruction as the destruction
    may happen immediately, leading to panic.
  
  Reported by:  bdragon

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c        Thu May 28 03:08:50 2020        (r361570)
+++ head/sys/net/route.c        Thu May 28 07:23:27 2020        (r361571)
@@ -411,9 +411,9 @@ rtfree(struct rtentry *rt)
 
        RT_LOCK_ASSERT(rt);
 
+       RT_UNLOCK(rt);
        epoch_call(net_epoch_preempt, destroy_rtentry_epoch,
            &rt->rt_epoch_ctx);
-       RT_UNLOCK(rt);
 }
 
 static void
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to