Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1368892

Re: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in hv_need_to_signal_on_read()

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in hv_need_to_signal_on_read()
Date 2016-04-01 02:10 +0200
Message-ID <riUP0-4r5-3@gated-at.bofh.it> (permalink)
References <rg0ee-2bF-3@gated-at.bofh.it> <rg0ee-2bF-5@gated-at.bofh.it> <rg0ee-2bF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Mar 23, 2016 at 05:53:53PM -0700, K. Y. Srinivasan wrote:
> We need to issue a full memory barrier prior making a signalling decision.
> 
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/hv/ring_buffer.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
> index 2919395..67dc245 100644
> --- a/drivers/hv/ring_buffer.c
> +++ b/drivers/hv/ring_buffer.c
> @@ -104,6 +104,7 @@ static bool hv_need_to_signal_on_read(struct hv_ring_buffer_info *rbi)
>  	u32 cur_write_sz;
>  	u32 pending_sz;
>  
> +	mb();

And, are you sure this is correct?  You better document the heck out of
this, why it's here, and what it is protecting.  "raw" mb() calls are
really rare for good reason.

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/7] Drivers: hv: vmbus: Introduce functions for estimating room in the ring buffer "K. Y. Srinivasan" <kys@microsoft.com> - 2016-03-24 00:20 +0100
  [PATCH 5/7] Drivers: hv: vmbus: Export the vmbus_set_event() API "K. Y. Srinivasan" <kys@microsoft.com> - 2016-03-24 00:20 +0100
  [PATCH 6/7] Drivers: hv: vmbus: Move some ring buffer functions to hyperv.h "K. Y. Srinivasan" <kys@microsoft.com> - 2016-03-24 00:20 +0100
  [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in hv_need_to_signal_on_read() "K. Y. Srinivasan" <kys@microsoft.com> - 2016-03-24 00:20 +0100
    Re: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in  hv_need_to_signal_on_read() Greg KH <gregkh@linuxfoundation.org> - 2016-04-01 02:00 +0200
      RE: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in  hv_need_to_signal_on_read() KY Srinivasan <kys@microsoft.com> - 2016-04-01 23:10 +0200
    Re: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in  hv_need_to_signal_on_read() Greg KH <gregkh@linuxfoundation.org> - 2016-04-01 02:10 +0200
      RE: [PATCH 3/7] Drivers: hv: vmbus: Fix a bug in  hv_need_to_signal_on_read() KY Srinivasan <kys@microsoft.com> - 2016-04-02 00:00 +0200
  [PATCH 7/7] Drivers: hv: vmbus: Implement APIs to support "in place" consumption of vmbus packets "K. Y. Srinivasan" <kys@microsoft.com> - 2016-03-24 00:20 +0100

csiph-web