From ba02f0c0b2247e02dcf700265f663124b0b69d4b Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 18 Aug 2005 10:36:44 +0000 Subject: [PATCH] b=7357 - couple LASSERTs to catch use-after-free --- lustre/osc/osc_request.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 9ce88ea..170c8dc 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1475,6 +1475,8 @@ static int osc_send_oap_rpc(struct client_obd *cli, struct lov_oinfo *loi, LIST_HEAD(rpc_list); ENTRY; + LASSERT(lop != LP_POISON); + /* first we find the pages we're allowed to work with */ list_for_each_safe(pos, tmp, &lop->lop_pending) { oap = list_entry(pos, struct osc_async_page, oap_pending_item); @@ -1778,6 +1780,7 @@ static void osc_check_rpcs(struct client_obd *cli) while ((loi = osc_next_loi(cli)) != NULL) { LOI_DEBUG(loi, "%lu in flight\n", rpcs_in_flight(cli)); + LASSERT(loi->loi_ost_idx != LL_POISON); if (rpcs_in_flight(cli) >= cli->cl_max_rpcs_in_flight) break; -- 1.8.3.1