diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2024-12-06 19:32:59 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2024-12-17 01:25:44 +0300 |
commit | 66e0c4f91461d17d48071695271c824620bed4ef (patch) | |
tree | f86c971bfd358e57cd9817644ec293ca854bada9 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9abee475803fab6ad59d4f4fc59c6a75374a7d9d (diff) | |
download | linux-66e0c4f91461d17d48071695271c824620bed4ef.tar.xz |
ceph: fix memory leak in ceph_direct_read_write()
The bvecs array which is allocated in iter_get_bvecs_alloc() is leaked
and pages remain pinned if ceph_alloc_sparse_ext_map() fails.
There is no need to delay the allocation of sparse_ext map until after
the bvecs array is set up, so fix this by moving sparse_ext allocation
a bit earlier. Also, make a similar adjustment in __ceph_sync_read()
for consistency (a leak of the same kind in __ceph_sync_read() has been
addressed differently).
Cc: stable@vger.kernel.org
Fixes: 03bc06c7b0bd ("ceph: add new mount option to enable sparse reads")
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions