Author: sbruno
Date: Mon Aug  8 19:31:01 2016
New Revision: 303848
URL: https://svnweb.freebsd.org/changeset/base/303848

Log:
  Avoid panic from ng_uncallout when unpluggin ethernet cable with active
  PPTP VPN connection.
  
  Submitted by: Michael Zhilin <miz...@gmail.com>
  Reviewed by:  ngie
  MFC after:    3 days
  Differential Revision:        https://reviews.freebsd.org/D7209

Modified:
  head/sys/netgraph/ng_base.c

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c Mon Aug  8 18:57:50 2016        (r303847)
+++ head/sys/netgraph/ng_base.c Mon Aug  8 19:31:01 2016        (r303848)
@@ -3815,7 +3815,7 @@ ng_uncallout(struct callout *c, node_p n
        item = c->c_arg;
        /* Do an extra check */
        if ((rval > 0) && (c->c_func == &ng_callout_trampoline) &&
-           (NGI_NODE(item) == node)) {
+           (item != NULL) && (NGI_NODE(item) == node)) {
                /*
                 * We successfully removed it from the queue before it ran
                 * So now we need to unreference everything that was
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to