diff options
author | Yu Kuai <[email protected]> | 2023-01-03 16:47:55 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-01-15 20:53:27 -0700 |
commit | 216f764716f34fe68cedc7296ae2043a7727e640 (patch) | |
tree | 2e5261483bfdff8833f016b56ea997a1b48294d7 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | ee16c404f9bd03c6e083f76d45be0b6a774c0d14 (diff) |
block, bfq: switch 'bfqg->ref' to use atomic refcount apis
The updating of 'bfqg->ref' should be protected by 'bfqd->lock', however,
during code review, we found that bfq_pd_free() update 'bfqg->ref'
without holding the lock, which is problematic:
1) bfq_pd_free() triggered by removing cgroup is called asynchronously;
2) bfqq will grab bfqg reference, and exit bfqq will drop the reference,
which can concurrent with 1).
Unfortunately, 'bfqd->lock' can't be held here because 'bfqd' might already
be freed in bfq_pd_free(). Fix the problem by using atomic refcount apis.
Signed-off-by: Yu Kuai <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions