Commit 0808ebf2 authored by Ken Raeburn's avatar Ken Raeburn Committed by Mikulas Patocka

dm vdo: don't refer to dedupe_context after releasing it

Clear the dedupe_context pointer in a data_vio whenever ownership of
the context is lost, so that vdo can't examine it accidentally.
Signed-off-by: default avatarKen Raeburn <raeburn@redhat.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent 47ac09b9
...@@ -729,6 +729,7 @@ static void process_update_result(struct data_vio *agent) ...@@ -729,6 +729,7 @@ static void process_update_result(struct data_vio *agent)
!change_context_state(context, DEDUPE_CONTEXT_COMPLETE, DEDUPE_CONTEXT_IDLE)) !change_context_state(context, DEDUPE_CONTEXT_COMPLETE, DEDUPE_CONTEXT_IDLE))
return; return;
agent->dedupe_context = NULL;
release_context(context); release_context(context);
} }
...@@ -1648,6 +1649,7 @@ static void process_query_result(struct data_vio *agent) ...@@ -1648,6 +1649,7 @@ static void process_query_result(struct data_vio *agent)
if (change_context_state(context, DEDUPE_CONTEXT_COMPLETE, DEDUPE_CONTEXT_IDLE)) { if (change_context_state(context, DEDUPE_CONTEXT_COMPLETE, DEDUPE_CONTEXT_IDLE)) {
agent->is_duplicate = decode_uds_advice(context); agent->is_duplicate = decode_uds_advice(context);
agent->dedupe_context = NULL;
release_context(context); release_context(context);
} }
} }
...@@ -2321,6 +2323,7 @@ static void timeout_index_operations_callback(struct vdo_completion *completion) ...@@ -2321,6 +2323,7 @@ static void timeout_index_operations_callback(struct vdo_completion *completion)
* send its requestor on its way. * send its requestor on its way.
*/ */
list_del_init(&context->list_entry); list_del_init(&context->list_entry);
context->requestor->dedupe_context = NULL;
continue_data_vio(context->requestor); continue_data_vio(context->requestor);
timed_out++; timed_out++;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment