From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cornelia Huck Subject: Re: [PATCH 1/2] virtio/s390: avoid race on vcdev->config Date: Mon, 24 Sep 2018 14:55:54 +0200 Message-ID: <20180924145554.712f4cf4.cohuck@redhat.com> References: <20180921124621.43649-1-pasic@linux.ibm.com> <20180921124621.43649-2-pasic@linux.ibm.com> <20180921151433.519b6687.cohuck@redhat.com> <80a80dc6-ccb1-f245-b367-c2f9345ca151@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <80a80dc6-ccb1-f245-b367-c2f9345ca151@linux.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Farhan Ali , Halil Pasic , Christian Borntraeger Cc: linux-s390@vger.kernel.org, Colin Ian King , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Fri, 21 Sep 2018 17:47:47 -0400 Farhan Ali wrote: > On 09/21/2018 09:28 AM, Halil Pasic wrote: > > Anyway I'm fine with swapping the old out and your new version in, > > if you prefer it that way. > > > > If you do, would you like to have a respin? Just send me a respin with something that you find useful :) (maybe a mashup of our descriptions) (while at it, you could also add the cc:stable, which I agree make sense) > > > > Regards, > > Halil > > > > I had been looking into this code recently, and shouldn't vcdev->status > (function get/set_status functions) also have a lock around it? Or is it > not possible to have a race condition on vcdev->status? I don't think so, as status is only a byte. > > Thanks > Farhan > > > >>> > >>> Let us protect the shared state using vcdev->lock. > >>> > >>> Signed-off-by: Halil Pasic > >>> --- > >>> drivers/s390/virtio/virtio_ccw.c | 10 ++++++++-- > >>> 1 file changed, 8 insertions(+), 2 deletions(-) > >> > > > > >