]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Fix data race and use-before-assignment 21590/head
authorSebastian Wagner <sebastian.wagner@suse.com>
Mon, 23 Apr 2018 08:13:28 +0000 (10:13 +0200)
committerSebastian Wagner <sebastian.wagner@suse.com>
Mon, 23 Apr 2018 08:13:28 +0000 (10:13 +0200)
commit3a795a42d504e2452ffe86870b813b1882e6fd84
treef908b5c1fe815009921c3ea3a34b8e06c2295f12
parent7ca8e704712faaaea69745f8ad8bd00d527c3c5a
mgr/dashboard: Fix data race and use-before-assignment

The race happes, if a task raises an exception very early.
Then, `self.getter_thread.event` fails as `getter_thread` is
already `None`

Also fix use-before-assignment, as `t0` and `t1` are only defined,
if no exception was raised.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
src/pybind/mgr/dashboard/tools.py