Merge tag 'hyperv-next-signed-20220322' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / drivers / hv / vmbus_drv.c
index 12a2b37..60ee8b3 100644 (file)
@@ -1129,7 +1129,7 @@ void vmbus_on_msg_dpc(unsigned long data)
        }
 
        if (entry->handler_type == VMHT_BLOCKING) {
-               ctx = kmalloc(sizeof(*ctx) + payload_size, GFP_ATOMIC);
+               ctx = kmalloc(struct_size(ctx, msg.payload, payload_size), GFP_ATOMIC);
                if (ctx == NULL)
                        return;
 
@@ -1874,7 +1874,7 @@ static ssize_t target_cpu_store(struct vmbus_channel *channel,
 
        /* See init_vp_index(). */
        if (hv_is_perf_channel(channel))
-               hv_update_alloced_cpus(origin_cpu, target_cpu);
+               hv_update_allocated_cpus(origin_cpu, target_cpu);
 
        /* Currently set only for storvsc channels. */
        if (channel->change_target_cpu_callback) {