]> err.no Git - linux-2.6/blobdiff - net/netfilter/nf_conntrack_proto_tcp.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6] / net / netfilter / nf_conntrack_proto_tcp.c
index 271cd01d57aed49192d94dc7a98a066d884a9a7b..dd28fb239a60438b28ed3c90b9f5d979c8c6b700 100644 (file)
@@ -844,9 +844,15 @@ static int tcp_packet(struct nf_conn *ct,
                        /* Attempt to reopen a closed/aborted connection.
                         * Delete this connection and look up again. */
                        write_unlock_bh(&tcp_lock);
-                       if (del_timer(&ct->timeout))
+                       /* Only repeat if we can actually remove the timer.
+                        * Destruction may already be in progress in process
+                        * context and we must give it a chance to terminate.
+                        */
+                       if (del_timer(&ct->timeout)) {
                                ct->timeout.function((unsigned long)ct);
-                       return -NF_REPEAT;
+                               return -NF_REPEAT;
+                       }
+                       return -NF_DROP;
                }
                /* Fall through */
        case TCP_CONNTRACK_IGNORE: