From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6CE25A0471 for ; Thu, 15 Aug 2019 08:10:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7FF3C1BE90; Thu, 15 Aug 2019 08:10:00 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7BAE31BE8F for ; Thu, 15 Aug 2019 08:09:58 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Aug 2019 23:09:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,388,1559545200"; d="scan'208";a="260733183" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.71]) by orsmga001.jf.intel.com with ESMTP; 14 Aug 2019 23:09:55 -0700 Date: Thu, 15 Aug 2019 14:07:48 +0800 From: Tiwei Bie To: He Peng Cc: dev@dpdk.org, =?utf-8?B?IkNIRU5DSE9ORzEgW+mZiOWGsl0i?= , =?utf-8?B?IllFWElBT0ZFTkcxIFvlj7blsI/ls7BdIg==?= Message-ID: <20190815060748.GA8295@___> References: <25e23931-9add-4d5c-b46c-25d4f1f6c9f5@me.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <25e23931-9add-4d5c-b46c-25d4f1f6c9f5@me.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] *rte_vhost_rx_queue_count* should be protected by vq->access_lock X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Aug 14, 2019 at 03:31:09AM +0000, He Peng wrote: > Hi, > > We found that *rte_vhost_rx_queue_count* is not protected by vq->access_lock, > and the access to vq->avail->idx is not thread-safe, since at the same time, the vq->avail  might be  > > set by *vring_invalidate* when some vhost-user messages arrived, such as VRING_SET_ADDRESS, > VRING_SET_MEM_TABLE, etc. You are right. And other similar APIs also need to be protected. Thanks for reporting this! Thanks, Tiwei > > > Thanks.  > > > >