From 28934eef81b3c7a494b12cb87804098041d64659 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 2 Sep 2010 03:34:04 +0100 Subject: [retry] Hold reference while timer is running and during expiry callback Guarantee that a retry timer cannot go out of scope while the timer is running, and provide a guarantee to the expiry callback that the timer will remain in scope during the entire callback (similar to the guarantee provided to interface methods). Signed-off-by: Michael Brown --- src/net/ipv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/ipv4.c') diff --git a/src/net/ipv4.c b/src/net/ipv4.c index a3cbdb039..5918bbecf 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -222,7 +222,7 @@ static struct io_buffer * ipv4_reassemble ( struct io_buffer * iobuf ) { free_iob ( iobuf ); /* Set the reassembly timer */ - timer_init ( &fragbuf->frag_timer, ipv4_frag_expired ); + timer_init ( &fragbuf->frag_timer, ipv4_frag_expired, NULL ); start_timer_fixed ( &fragbuf->frag_timer, IP_FRAG_TIMEOUT ); /* Add the fragment buffer to the list of fragment buffers */ -- cgit v1.2.3-55-g7522