From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btoWN-0000c7-Rp for qemu-devel@nongnu.org; Tue, 11 Oct 2016 00:18:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btoWJ-000713-CA for qemu-devel@nongnu.org; Tue, 11 Oct 2016 00:18:30 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:34634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btoWJ-00070I-23 for qemu-devel@nongnu.org; Tue, 11 Oct 2016 00:18:27 -0400 Received: by mail-lf0-x242.google.com with SMTP id p80so1465525lfp.1 for ; Mon, 10 Oct 2016 21:18:26 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Dmitry Fleytman In-Reply-To: <57FC5DFE.4070708@cn.fujitsu.com> Date: Tue, 11 Oct 2016 07:18:23 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1473839464-8670-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1473839464-8670-9-git-send-email-caoj.fnst@cn.fujitsu.com> <87k2du7oo7.fsf@dusky.pond.sub.org> <57EE0CFB.4070002@cn.fujitsu.com> <878tu9ttzv.fsf@dusky.pond.sub.org> <017DDFF7-F80A-4C07-B533-4BEBEEA641CE@daynix.com> <57FC5DFE.4070708@cn.fujitsu.com> Subject: Re: [Qemu-devel] [PATCH v3 8/8] vmxnet3: remove unnecessary internal msix state flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin Cc: Markus Armbruster , Marcel Apfelbaum , Jason Wang , qemu-devel@nongnu.org, "Michael S. Tsirkin" > On 11 Oct 2016, at 6:35, Cao jin wrote: >=20 >=20 >=20 >> On 10/06/2016 05:39 PM, Dmitry Fleytman wrote: >>=20 >=20 >>=20 >> Hello, >>=20 >> Yes, from what I see, this call is wrong and leads to >> reference leaks on device unload at migration target. >> It should be removed. >>=20 >> Best regards, >> Dmitry >>=20 >=20 > Hi,Dmitry >=20 > =46rom what I saw, current code will call msix_vector_use twice on migr= ation target, which is wrong. I am not quite follow you on "reference leak",= are you saying the same thing as me? if not, could you help to explain more= ? Hello, Yes, I meant exactly this :) msix_vector_use() increments vector reference counter each time it is called= , so device holds two references to used vectors after migration. The second reference will be leaked because there is no second call to msix_= vector_unuse() on unload. Best Regards, Dmitry >=20 > --=20 > Yours Sincerely, >=20 > Cao jin >=20 >=20