Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6799595ybi; Mon, 22 Jul 2019 01:54:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHYDtUBwY7kdwiRZdDepK9bTjAVKzcyQGXHVvAxg43iQcTcUtIh/RDfNWBu+S7sK+ZU6gp X-Received: by 2002:a63:8ac3:: with SMTP id y186mr70107083pgd.13.1563785653092; Mon, 22 Jul 2019 01:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563785653; cv=none; d=google.com; s=arc-20160816; b=FVRVKIJ49mzn0a/+2h2jmUWvkOHtunur8OdA4mPjsyXvqCkBiAtSsfSw1DwSsjgvUr KPDvZBdZfH9REQ7l/V1TPkDmnIU2hO3RAFUWDgH4mnnEZEgGj4VqbMVIgRHEVddxAt8Y uZ4OzcnxGLPq7+NnG2ZkAHd2kO7zEre4yLpqf7hcjg/BDec2TWWAZdsFV7fTYul+Euse lXKCfZFeK+QGK8xViEb8rRtk1BERVw7Y2mulsGiwWCq4ICFqQKCNLyuiCfmy9N3sMZ5R UARsRYpE+HwwIFOt9stCE+BzDU5KTdPcZtW30UkO5S464eRy5dkPAU/uqwkr+rO7INT3 Fphg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Pxdh1JAMhfDShd1FEgvqF0pu+Shww6DQTz2CSwaPVTo=; b=AD1LmEApj26YpHDXkaFPufBZey9wchzxo7IC8IrfmngEa9pQ2juyXo3lKWRAdw440Z s528Wu1qHc7fgF/hR0Hhuk9JGpTdTH6Vhnt9eNrUW1fCt6psZyt2KtGGIqCCAbTZz+vC 3fU3dZ72mPs7+SAoNkNdMO6TjlZtxBofSz/7JgAVg+akDeScRnSZrFpQdHMa79ipdOL1 6p6a004yf/TxIIk16Oj2hXijZyeJfumdNAZaubGodzOOsUAgTXIWzZNNTC3lqWSRRnF2 FVIe2SNMejVaUfrAZwzUcN7N4lqN8HvPoa1yUKtCoeepvH5e72Ksx4rj+IZwdGUqlwXP nK6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z1si11481158plb.41.2019.07.22.01.53.56; Mon, 22 Jul 2019 01:54:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728546AbfGVIx3 (ORCPT + 99 others); Mon, 22 Jul 2019 04:53:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56386 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725989AbfGVIx2 (ORCPT ); Mon, 22 Jul 2019 04:53:28 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 69A6D30BC57D; Mon, 22 Jul 2019 08:53:28 +0000 (UTC) Received: from localhost (ovpn-117-250.ams2.redhat.com [10.36.117.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9A4E65DA2E; Mon, 22 Jul 2019 08:53:25 +0000 (UTC) Date: Mon, 22 Jul 2019 09:53:19 +0100 From: Stefan Hajnoczi To: Stefano Garzarella Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , virtualization@lists.linux-foundation.org, Jason Wang , kvm@vger.kernel.org, "Michael S. Tsirkin" Subject: Re: [PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt() Message-ID: <20190722085319.GC24934@stefanha-x1.localdomain> References: <20190717113030.163499-1-sgarzare@redhat.com> <20190717113030.163499-4-sgarzare@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Clx92ZfkiYIKRjnr" Content-Disposition: inline In-Reply-To: <20190717113030.163499-4-sgarzare@redhat.com> User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Mon, 22 Jul 2019 08:53:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 17, 2019 at 01:30:28PM +0200, Stefano Garzarella wrote: > fwd_cnt and last_fwd_cnt are protected by rx_lock, so we should use > the same spinlock also if we are in the TX path. >=20 > Move also buf_alloc under the same lock. >=20 > Signed-off-by: Stefano Garzarella > --- > include/linux/virtio_vsock.h | 2 +- > net/vmw_vsock/virtio_transport_common.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi --Clx92ZfkiYIKRjnr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl01eX8ACgkQnKSrs4Gr c8jE7AgAs5N6O7elzpZi4u/g75m8dfsiRpiyEG+NXL6ahFUWKw98b80S/q2RNHZR udZDGbmyVjnwH1pok2YnjdwcqCq515JelqAdv7CdhhzzRZdwiHGMQh8uqHYDfzGZ R2V0hSJAiSG21HxP+RBG6VoWCoBUeQU/vce3jkYsxT6F64tUqeqxJd/C+AcRHOKk dxxTmtn2NdRRs6Hofl5nW0ulYG/wxRRtN3dTf+V/FKkXLYv1197AD0+JXZnTRw2s 159FbLvqqdFzBGt2HORUTR+7aTcBuILeDuLW8gJT6JrFF2MIw1B0VaSB0Lbv0mN6 tuZAmnZlcurH5zz8i5XOJ5mugHY72w== =VeGT -----END PGP SIGNATURE----- --Clx92ZfkiYIKRjnr--