diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-25 11:22:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-25 11:22:13 +0200 |
commit | 5450a5f4bfa0ca953ba4c0ccfbebc12c66554278 (patch) | |
tree | 800652a46caa46092a2bed23ea87e960dd84d441 /include | |
parent | 085b7755808aa11f78ab9377257e1dad2e6fa4bb (diff) | |
parent | a0033bd1eae4650b69be07c17cb87393da584563 (diff) | |
download | linux-5450a5f4bfa0ca953ba4c0ccfbebc12c66554278.tar.bz2 |
Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux into char-misc-linus
Sasha writes:
Three fixes:
1. Fix for a race condition in the hyper-v ringbuffer code by Kimberly
Brown.
2. Fix to show monitor data only when monitor pages are actually
allocated, also by Kimberly Brown.
3. Fix cpu reference counting in the vmbus code by Dexuan Cui.
* tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup()
Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex
Drivers: hv: vmbus: Set ring_info field to 0 and remove memset
Drivers: hv: vmbus: Refactor chan->state if statement
Drivers: hv: vmbus: Expose monitor data only when monitor pages are used
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hyperv.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index 64698ec8f2ac..8b9a93c99c9b 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -141,6 +141,11 @@ struct hv_ring_buffer_info { u32 ring_datasize; /* < ring_size */ u32 priv_read_index; + /* + * The ring buffer mutex lock. This lock prevents the ring buffer from + * being freed while the ring buffer is being accessed. + */ + struct mutex ring_buffer_mutex; }; @@ -1206,7 +1211,7 @@ struct hv_ring_buffer_debug_info { }; -int hv_ringbuffer_get_debuginfo(const struct hv_ring_buffer_info *ring_info, +int hv_ringbuffer_get_debuginfo(struct hv_ring_buffer_info *ring_info, struct hv_ring_buffer_debug_info *debug_info); /* Vmbus interface */ |