RE: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-29 Thread Michael Kelley
From: Kimberly Brown Sent: Thursday, March 14, 2019 1:05 PM > > Fix a race condition that can result in a ring buffer pointer being set > to null while a "_show" function is reading the ring buffer's data. This > problem was discussed here: https://lkml.org/lkml/2018/10/18/779 > > To fix the

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-28 Thread Stephen Hemminger
On Thu, 28 Mar 2019 00:30:57 -0400 Kimberly Brown wrote: > On Thu, Mar 21, 2019 at 04:04:20PM +, Michael Kelley wrote: > > From: Kimberly Brown Sent: Wednesday, March 20, > > 2019 8:48 PM > > > > > > Adding more locks will solve the problem but it seems like overkill. > > > > > > Why

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-27 Thread Kimberly Brown
On Thu, Mar 21, 2019 at 04:04:20PM +, Michael Kelley wrote: > From: Kimberly Brown Sent: Wednesday, March 20, 2019 > 8:48 PM > > > > > Adding more locks will solve the problem but it seems like overkill. > > > > > Why not either use a reference count or an RCU style access for the > > > > >

RE: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-21 Thread Michael Kelley
From: Kimberly Brown Sent: Wednesday, March 20, 2019 8:48 PM > > > > Adding more locks will solve the problem but it seems like overkill. > > > > Why not either use a reference count or an RCU style access for the > > > > ring buffer? > > > > > > I agree that a reference count or RCU could also

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-20 Thread Kimberly Brown
On Wed, Mar 20, 2019 at 01:06:19PM -0700, Stephen Hemminger wrote: > On Sat, 16 Mar 2019 21:49:28 -0400 > Kimberly Brown wrote: > > > On Thu, Mar 14, 2019 at 03:45:33PM -0700, Stephen Hemminger wrote: > > > On Thu, 14 Mar 2019 13:05:15 -0700 > > > "Kimberly Brown" wrote: > > > > > > > Fix a

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-20 Thread Stephen Hemminger
On Sat, 16 Mar 2019 21:49:28 -0400 Kimberly Brown wrote: > On Thu, Mar 14, 2019 at 03:45:33PM -0700, Stephen Hemminger wrote: > > On Thu, 14 Mar 2019 13:05:15 -0700 > > "Kimberly Brown" wrote: > > > > > Fix a race condition that can result in a ring buffer pointer being set > > > to null

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-16 Thread Kimberly Brown
On Thu, Mar 14, 2019 at 03:45:33PM -0700, Stephen Hemminger wrote: > On Thu, 14 Mar 2019 13:05:15 -0700 > "Kimberly Brown" wrote: > > > Fix a race condition that can result in a ring buffer pointer being set > > to null while a "_show" function is reading the ring buffer's data. This > > problem

Re: [PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-14 Thread Stephen Hemminger
On Thu, 14 Mar 2019 13:05:15 -0700 "Kimberly Brown" wrote: > Fix a race condition that can result in a ring buffer pointer being set > to null while a "_show" function is reading the ring buffer's data. This > problem was discussed here: >

[PATCH v3 3/3] Drivers: hv: vmbus: Fix race condition with new ring_buffer_info mutex

2019-03-14 Thread Kimberly Brown
Fix a race condition that can result in a ring buffer pointer being set to null while a "_show" function is reading the ring buffer's data. This problem was discussed here: https://lkml.org/lkml/2018/10/18/779 To fix the race condition, add a new mutex lock to the "hv_ring_buffer_info" struct.