mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 08:02:59 -04:00
Merge tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client
Pull two ceph fixes from Ilya Dryomov: "A fix for a -rc1 regression in rbd and a trivial static checker fix" * tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client: rbd: restore zeroing past the overlap when reading from parent libceph: don't call crypto_free_sync_skcipher() on a NULL tfm
This commit is contained in:
@@ -3038,6 +3038,17 @@ static bool rbd_obj_advance_read(struct rbd_obj_request *obj_req, int *result)
|
||||
}
|
||||
return true;
|
||||
case RBD_OBJ_READ_PARENT:
|
||||
/*
|
||||
* The parent image is read only up to the overlap -- zero-fill
|
||||
* from the overlap to the end of the request.
|
||||
*/
|
||||
if (!*result) {
|
||||
u32 obj_overlap = rbd_obj_img_extents_bytes(obj_req);
|
||||
|
||||
if (obj_overlap < obj_req->ex.oe_len)
|
||||
rbd_obj_zero_range(obj_req, obj_overlap,
|
||||
obj_req->ex.oe_len - obj_overlap);
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
BUG();
|
||||
|
||||
@@ -136,8 +136,10 @@ void ceph_crypto_key_destroy(struct ceph_crypto_key *key)
|
||||
if (key) {
|
||||
kfree(key->key);
|
||||
key->key = NULL;
|
||||
crypto_free_sync_skcipher(key->tfm);
|
||||
key->tfm = NULL;
|
||||
if (key->tfm) {
|
||||
crypto_free_sync_skcipher(key->tfm);
|
||||
key->tfm = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user