Commit 43257b2e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'kmalloc_obj-prep-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull kmalloc_obj prep from Kees Cook:
 "Fixes for return types to prepare for the kmalloc_obj treewide
  conversion, that haven't yet appeared during the merge window:
  dm-crypt, dm-zoned, drm/msm, and arm64 kvm"

* tag 'kmalloc_obj-prep-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  KVM: arm64: vgic: Handle const qualifier from gic_kvm_info allocation type
  drm/msm: Adjust msm_iommu_pagetable_prealloc_allocate() allocation type
  dm: dm-zoned: Adjust dmz_load_mapping() allocation type
  dm-crypt: Adjust crypt_alloc_tfms_aead() allocation type
parents a95f71ad c732084c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -654,7 +654,7 @@ static struct gic_kvm_info *gic_kvm_info;
void __init vgic_set_kvm_info(const struct gic_kvm_info *info)
{
	BUG_ON(gic_kvm_info != NULL);
	gic_kvm_info = kmalloc(sizeof(*info), GFP_KERNEL);
	gic_kvm_info = kmalloc(sizeof(*gic_kvm_info), GFP_KERNEL);
	if (gic_kvm_info)
		*gic_kvm_info = *info;
}
+1 −1
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ msm_iommu_pagetable_prealloc_allocate(struct msm_mmu *mmu, struct msm_mmu_preall
	struct kmem_cache *pt_cache = get_pt_cache(mmu);
	int ret;

	p->pages = kvmalloc_array(p->count, sizeof(p->pages), GFP_KERNEL);
	p->pages = kvmalloc_array(p->count, sizeof(*p->pages), GFP_KERNEL);
	if (!p->pages)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -2364,7 +2364,7 @@ static int crypt_alloc_tfms_aead(struct crypt_config *cc, char *ciphermode)
{
	int err;

	cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_aead *), GFP_KERNEL);
	cc->cipher_tfm.tfms = kmalloc(sizeof(struct crypto_skcipher *), GFP_KERNEL);
	if (!cc->cipher_tfm.tfms)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -1687,7 +1687,7 @@ static int dmz_load_mapping(struct dmz_metadata *zmd)

	/* Metadata block array for the chunk mapping table */
	zmd->map_mblk = kcalloc(zmd->nr_map_blocks,
				sizeof(struct dmz_mblk *), GFP_KERNEL);
				sizeof(struct dmz_mblock *), GFP_KERNEL);
	if (!zmd->map_mblk)
		return -ENOMEM;