In the Linux kernel, the following vulnerability has been resolved: ceph: fix memory leak in cephdirectreadwrite() The bvecs array which is allocated in itergetbvecsalloc() is leaked and pages remain pinned if cephallocsparseextmap() fails. There is no need to delay the allocation of sparseext map until after the bvecs array is set up, so fix this by moving sparseext allocation a bit earlier. Also, make a similar adjustment in _cephsyncread() for consistency (a leak of the same kind in _cephsyncread() has been addressed differently).