mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +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:
@@ -281,7 +281,7 @@ ib_create_madx ( struct ib_device *ibdev, struct ib_mad_interface *mi,
|
||||
madx = zalloc ( sizeof ( *madx ) );
|
||||
if ( ! madx )
|
||||
return NULL;
|
||||
timer_init ( &madx->timer, ib_mi_timer_expired );
|
||||
timer_init ( &madx->timer, ib_mi_timer_expired, NULL );
|
||||
madx->mi = mi;
|
||||
madx->op = op;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user