From 25429e274371eba9a90ea27cbf73e88329916e0d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 20 Mar 2024 15:28:43 -0700 Subject: [PATCH] ddp: Clear active DDP buffer members to NULL to pacify an assertion Reviewed by: np Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D43999 --- sys/dev/cxgbe/tom/t4_ddp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_ddp.c b/sys/dev/cxgbe/tom/t4_ddp.c index 89cb7269e21..1cd1ea68826 100644 --- a/sys/dev/cxgbe/tom/t4_ddp.c +++ b/sys/dev/cxgbe/tom/t4_ddp.c @@ -186,10 +186,17 @@ free_ddp_buffer(struct tom_data *td, struct ddp_buffer *db) */ if (!aio_clear_cancel_function(db->job)) ddp_complete_one(db->job, 0); +#ifdef INVARIANTS + db->job = NULL; +#endif } - if (db->ps) + if (db->ps) { free_pageset(td, db->ps); +#ifdef INVARIANTS + db->ps = NULL; +#endif + } } static void