Skip to content

Commit

Permalink
Merge tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Linus Torvalds committed Aug 30, 2019
2 parents 0d70787 + d435c9a commit fbcb0b4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 4 additions & 2 deletions net/ceph/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit fbcb0b4

Please sign in to comment.