• Dexuan Cui's avatar
    Drivers: hv: vmbus: Use get/put_cpu() in vmbus_connect() · 1d24e260
    Dexuan Cui authored
    commit 41e270f6898e7502be9fd6920ee0a108ca259d36 upstream.
    
    With CONFIG_DEBUG_PREEMPT=y, I always see this warning:
    BUG: using smp_processor_id() in preemptible [00000000]
    
    Fix the false warning by using get/put_cpu().
    
    Here vmbus_connect() sends a message to the host and waits for the
    host's response. The host will deliver the response message and an
    interrupt on CPU msg->target_vcpu, and later the interrupt handler
    will wake up vmbus_connect(). vmbus_connect() doesn't really have
    to run on the same cpu as CPU msg->target_vcpu, so it's safe to
    call put_cpu() just here.
    Signed-off-by: 's avatarDexuan Cui <decui@microsoft.com>
    Cc: stable@vger.kernel.org
    Cc: K. Y. Srinivasan <kys@microsoft.com>
    Cc: Haiyang Zhang <haiyangz@microsoft.com>
    Cc: Stephen Hemminger <sthemmin@microsoft.com>
    Signed-off-by: 's avatarK. Y. Srinivasan <kys@microsoft.com>
    Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    1d24e260
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
channel.c Loading commit data...
channel_mgmt.c Loading commit data...
connection.c Loading commit data...
hv.c Loading commit data...
hv_balloon.c Loading commit data...
hv_fcopy.c Loading commit data...
hv_kvp.c Loading commit data...
hv_snapshot.c Loading commit data...
hv_util.c Loading commit data...
hv_utils_transport.c Loading commit data...
hv_utils_transport.h Loading commit data...
hyperv_vmbus.h Loading commit data...
ring_buffer.c Loading commit data...
vmbus_drv.c Loading commit data...