Messages in this thread | | | Date | Thu, 21 Feb 2019 22:46:54 -0500 | From | Kimberly Brown <> | Subject | [PATCH v2 0/2] Fix a race condition vulnerability in "_show" functions |
| |
This patchset fixes a race condition vulnerability in the "_show" functions that access a channel ring buffer.
Changes in v2: - In v1, I proposed using “vmbus_connection.channel_mutex” in the “_show” functions to prevent the race condition. However, using this mutex could result in a deadlock, so a new approach is needed.
- Patch 1 is new and consists of a code refactor.
- Patch 2 introduces a new mutex lock in the “vmbus_channel” struct, and the new mutex is used to eliminate the race condition.
Kimberly Brown (2): Drivers: hv: vmbus: Refactor chan->state if statement Drivers: hv: vmbus: Add a channel ring buffer mutex lock
drivers/hv/channel.c | 5 ++ drivers/hv/channel_mgmt.c | 1 + drivers/hv/ring_buffer.c | 11 +++- drivers/hv/vmbus_drv.c | 118 ++++++++++++++++++++++++++------------ include/linux/hyperv.h | 10 +++- 5 files changed, 104 insertions(+), 41 deletions(-)
-- 2.17.1
| |