From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 0D8ED2C8 for ; Tue, 22 May 2018 11:11:21 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id f8-v6so31454929wmc.4 for ; Tue, 22 May 2018 02:11:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Eau8RMtSebSSzxjW/bzZr5UxPyzbUIrhM+BaehjS444=; b=ik/sKql9MQHle/Pk4ob2WjhOVindhkeuL4nchK+NdwWH6pByKpVYtdWPJJwY5PnGkh p6qm2NiuagE0INc4NUjdgrL8w5/HAnhOolVbLIO4CoocHLyCuHPoYaC0NZEpDz7xvzgG HMUziFpF28Zp/0a0tS0GqgwsLV/34EC3fPe+uPEsEntP30M3PoG2lP2s+cYNt0n6u7Gz a9OgyjZRoq2reN5ueuUaA9s+AoZlDsiarGunU11VNRKZj2Crv9ebPdGTO+5cH8oBVoAt gRQtZspIF/J6ngybPPeLDkcQvCbLmqUkgMDa2f0TyFsLfuZXnwHatDv4TGJdhaMiUhgw x8Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Eau8RMtSebSSzxjW/bzZr5UxPyzbUIrhM+BaehjS444=; b=JIbTDJU7MwpthiflciebcoekNhMe6rtMZMGQUpL9pq8fhQmc4JndEycF8rhiQoYdGS CK9uQTCQeOhbGZMOy17XUdYQ9LzifL2NS1zPfXG61dys01HuHkbI6cjK0Y9WwOd0Eyqu E5XjAKG9O0kprcQaucYy/g8Zq3WZ7twEoPtTegGKg2cKijDxdfgVwAlaG61ZlHRcKSZZ /fm4o/EFcA25Svpga9yLGfWhY4nBOq2RS97Cs/agGmMeiybdRqSWGyBdPLIX2JpDj/0Q Ioznh07jtm6hHTA3HWjDCMtSzZIe6sHdBkYRbnn+o9JoOZMoOFSvOGfjaZmc9I5NRtVt EIaA== X-Gm-Message-State: ALKqPwezT0t3F1UUb8Z6k7ASswLGmTwibMa5Hu385ztM++xVi8WTWtBL jm6kt3+upwwSraR26i1yVxwKYLil X-Google-Smtp-Source: AB8JxZoDzz3QScYrXb0Z7sy0NSv4tMHXnEv46kEX4PWicUwFQOyvyLSR+lIvcrte5p8b0O1CmE58WA== X-Received: by 2002:a1c:42cd:: with SMTP id k74-v6mr500265wmi.81.1526980281579; Tue, 22 May 2018 02:11:21 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u89-v6sm22063607wma.4.2018.05.22.02.11.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 May 2018 02:11:20 -0700 (PDT) Date: Tue, 22 May 2018 11:11:06 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Matan Azrad Cc: Thomas Monjalon , "dev@dpdk.org" , "ferruh.yigit@intel.com" Message-ID: <20180522091105.hmwnwkjejyu7f6vi@bidouze.vm.6wind.com> References: <20180521161156.25724-1-thomas@monjalon.net> <20180521164544.26421-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v2] bus/vdev: fix scope of device list 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: , X-List-Received-Date: Tue, 22 May 2018 09:11:22 -0000 On Mon, May 21, 2018 at 05:28:52PM +0000, Matan Azrad wrote: > > > From: Thomas Monjalon > > The lock vdev_device_list_lock was taken before calling "remove" function for > > the device. > > So it prevents to remove sub-devices (as in failsafe) inside its own "remove" > > function, because of a deadlock. > > > > The lock is now only protecting the device list inside the bus driver. > > > > Fixes: 35f462839b69 ("bus/vdev: add lock on device list") > > > > Signed-off-by: Thomas Monjalon > Tested-by: Matan Azrad If these locks were necessary, they would be missing as well for rte_devargs. Jianfeng inquired about it, I think it should be followed upon. Restricting the scope of the lock here could maybe re-introduce the bug that motivated their introduction in the first place, as the devargs_remove() is not in the critical section anymore. However, this is an rte_devargs issue, not a vdev bus one, so the fix makes sense and I'd like to have it ASAP for failsafe. Without a vdev bus maintainer left: Acked-by: Gaetan Rivet -- Gaëtan Rivet 6WIND