mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 01:52:08 +03:00
[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 <mcb30@ipxe.org>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user