kernel/arch/s390/include/asm/idals.h
.. .. @@ -122,8 +122,7 @@ 122 122 123 123 nr_ptrs = (size + IDA_BLOCK_SIZE - 1) >> IDA_SIZE_LOG; 124 124 nr_chunks = (4096 << page_order) >> IDA_SIZE_LOG; 125 - ib = kmalloc(sizeof(struct idal_buffer) + nr_ptrs*sizeof(void *),126 - GFP_DMA | GFP_KERNEL);125 + ib = kmalloc(struct_size(ib, data, nr_ptrs), GFP_DMA | GFP_KERNEL);127 126 if (ib == NULL) 128 127 return ERR_PTR(-ENOMEM); 129 128 ib->size = size;