diff options
| author | Ilya Dryomov <idryomov@gmail.com> | 2024-12-06 17:32:59 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-27 14:02:19 +0100 |
| commit | eb9041837123f31d5897e99bb761f46cb4ce5859 (patch) | |
| tree | d38a4ab784b9fb3f6b68385962c86f23646fa29e /scripts/git.orderFile | |
| parent | cbd952b2c4e6eb5dcfdb931e74eff1607f31b496 (diff) | |
| download | linux-eb9041837123f31d5897e99bb761f46cb4ce5859.tar.gz linux-eb9041837123f31d5897e99bb761f46cb4ce5859.tar.bz2 linux-eb9041837123f31d5897e99bb761f46cb4ce5859.zip | |
ceph: fix memory leak in ceph_direct_read_write()
commit 66e0c4f91461d17d48071695271c824620bed4ef upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions
