kernel - Try to fix NULL pointer issue in syncache_timer_handler()
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 30 Apr 2010 18:08:14 +0000 (11:08 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 30 Apr 2010 18:09:24 +0000 (11:09 -0700)
* There seems to be a case where a tcpcb's inp can be NULL when accessed
  from syncache_timer_handler().  Try to handle it.

sys/netinet/tcp_syncache.c

index 3b1673f..d5ceb23 100644 (file)
@@ -513,6 +513,7 @@ syncache_timer_handler(netmsg_t netmsg)
                inp = sc->sc_tp->t_inpcb;
                if (slot == SYNCACHE_MAXREXMTS ||
                    slot >= tcp_syncache.rexmt_limit ||
+                   inp == NULL ||
                    inp->inp_gencnt != sc->sc_inp_gencnt) {
                        nsc = TAILQ_NEXT(sc, sc_timerq);
                        syncache_drop(sc, NULL);