lkml.org 
[lkml]   [2022]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] vhost: Protect the virtqueue from being cleared whilst still in use
On Mon, 14 Mar 2022, Michael S. Tsirkin wrote:

> On Mon, Mar 14, 2022 at 08:43:02AM +0000, Lee Jones wrote:
> > vhost_vsock_handle_tx_kick() already holds the mutex during its call
> > to vhost_get_vq_desc(). All we have to do here is take the same lock
> > during virtqueue clean-up and we mitigate the reported issues.
> >
> > Also WARN() as a precautionary measure. The purpose of this is to
> > capture possible future race conditions which may pop up over time.
> >
> > Cc: <stable@vger.kernel.org>
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
>
> Pls refer to my previous responses to this patch. I'd like to see an
> argument for why this will make future bugs less and not more likely.

If you think the previous 'check owner' patch fixes all of the
concurrency issues, then this patch can be dropped.

--
Lee Jones [李琼斯]
Principal Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

\
 
 \ /
  Last update: 2022-03-14 13:49    [W:0.128 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site