[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170817140541.GH5539@stefanha-x1.localdomain>
Date: Thu, 17 Aug 2017 15:05:41 +0100
From: Stefan Hajnoczi <stefanha@...hat.com>
To: Dexuan Cui <decui@...rosoft.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
George Zhang <georgezhang@...are.com>,
Jorgen Hansen <jhansen@...are.com>,
Michal Kubecek <mkubecek@...e.cz>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Cathy Avery <cavery@...hat.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
Rolf Neugebauer <rolf.neugebauer@...ker.com>,
Dave Scott <dave.scott@...ker.com>,
Marcelo Cerri <marcelo.cerri@...onical.com>,
"apw@...onical.com" <apw@...onical.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"joe@...ches.com" <joe@...ches.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH net-next 2/3] vsock: fix vsock_dequeue/enqueue_accept race
On Tue, Aug 15, 2017 at 10:15:39PM +0000, Dexuan Cui wrote:
> With the current code, when vsock_dequeue_accept() is removing a sock
> from the list, nothing prevents vsock_enqueue_accept() from adding a new
> sock into the list concurrently. We should add a lock to protect the list.
The listener sock is locked, preventing concurrent modification. I have
checked both the virtio and vmci transports. Can you post an example
where the listener sock isn't locked?
Stefan
Download attachment "signature.asc" of type "application/pgp-signature" (456 bytes)
Powered by blists - more mailing lists