kmalloc_obj prep for v7.0-rc1
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. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRSPkdeREjth1dHnSE2KwveOeQkuwUCaZdWjQAKCRA2KwveOeQk uznwAQCs2YgAlDk7xbLoeOuOiJhCtYPDABRP8yN+6TVlea55xQD8DrQRGNUMmumX GpPLLznBR+iW1qTAg0jqPnMEXA1Cfwk= =B/cW -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
43257b2ebd
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue