Skip to content
Snippets Groups Projects
Commit e8b35bf5 authored by Roman Kagan's avatar Roman Kagan Committed by Eric Blake
Browse files

block/nbd: ensure ->connection_thread is always valid


Simplify lifetime management of BDRVNBDState->connect_thread by
delaying the possible cleanup of it until the BDRVNBDState itself goes
away.

This also reverts
 0267101a "block/nbd: fix possible use after free of s->connect_thread"
as now s->connect_thread can't be cleared until the very end.

Signed-off-by: default avatarRoman Kagan <rvkagan@yandex-team.ru>
 [vsementsov: rebase, revert 0267101a changes]
Signed-off-by: default avatarVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
 [eblake: tweak comment]
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Message-Id: <20210610100802.5888-8-vsementsov@virtuozzo.com>
Signed-off-by: default avatarEric Blake <eblake@redhat.com>
parent 6cc702be
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment