From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0084.outbound.protection.outlook.com [104.47.1.84]) by dpdk.org (Postfix) with ESMTP id E20701B21D for ; Mon, 21 May 2018 19:28:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=073Nz9mo6adGeZdEK6El2KY+OxEmG3FarHv2fnKMrP8=; b=e2G4JJCfy4h3R/+aFFudvwSzia0q9GFTRA5wk2B9LgJmNRfYVrmldp2Pht5otO0BYztb/Zp+GCaL/37AKrkGzFRUGg2E7AO+DpVvcQfAkPegguPcIjnYK/vNyR//bQSIo9nMQiflyDEl7NC5hTklVFXiiTfjvdWWT1+3JcyO/2s= Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com (10.168.137.20) by VI1PR0501MB2720.eurprd05.prod.outlook.com (10.172.15.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Mon, 21 May 2018 17:28:52 +0000 Received: from VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::1035:58f9:b94c:2180]) by VI1PR0501MB2608.eurprd05.prod.outlook.com ([fe80::1035:58f9:b94c:2180%18]) with mapi id 15.20.0776.015; Mon, 21 May 2018 17:28:52 +0000 From: Matan Azrad To: Thomas Monjalon , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" Thread-Topic: [PATCH v2] bus/vdev: fix scope of device list lock Thread-Index: AQHT8SMz/f12ZaFTokyav8U2OrGBTqQ6alWQ Date: Mon, 21 May 2018 17:28:52 +0000 Message-ID: References: <20180521161156.25724-1-thomas@monjalon.net> <20180521164544.26421-1-thomas@monjalon.net> In-Reply-To: <20180521164544.26421-1-thomas@monjalon.net> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0501MB2720; 7:Jne9VNDV9kYhPZXBLs3Ae+5ryWBDrPICIO/2oLXH72Iv6t0X0FHOC6P3lExR4CL2oT5B7HgUYG1ccDtkHHVcqfiMcH/3qzX4t9qvC2LavWIwj4OAli/ATnxa1fBbWpJsBBGZkYuNQBrfrSqXkbVdVL6lSZX8exSCaDWD4MwscaBRCyUfIQeTFzsnvoHDdAAqEbhUe6JXtT2TjtwIt55CoJiaPef67im2Fv/8AaG09NCKtQJd7ItZGS5IjhWUMTwN x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2720; x-ms-traffictypediagnostic: VI1PR0501MB2720: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(17755550239193); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2720; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2720; x-forefront-prvs: 06793E740F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(39860400002)(376002)(39380400002)(189003)(199004)(3280700002)(74316002)(446003)(102836004)(486006)(6506007)(53936002)(9686003)(76176011)(476003)(26005)(6246003)(59450400001)(186003)(2906002)(5250100002)(2501003)(7696005)(33656002)(8936002)(11346002)(81166006)(7736002)(81156014)(99286004)(105586002)(4326008)(305945005)(106356001)(8676002)(3660700001)(3846002)(5660300001)(97736004)(2900100001)(6116002)(316002)(68736007)(478600001)(229853002)(25786009)(6436002)(55016002)(86362001)(66066001)(14454004)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2720; H:VI1PR0501MB2608.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: NEoVQBkvFcY7+/YdNfoEXfjW4bmwFQp1xvZEzNRaiZk37QtVSNgJL+0ywMwwAF73d5vnACUnyMzpV71WtmrdaAwxCOUwJ5PqqTBjWzvQivEn8t2vMQFYVMyPxcvNR5AKs/iBRqqMowCv7HKgkjnU8PLa+dZtC+UyV79rKRAAVgkgjSPXNhkOwj2AUinHGC0E spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 92a9be27-1f1e-43cc-caec-08d5bf405258 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92a9be27-1f1e-43cc-caec-08d5bf405258 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2018 17:28:52.2374 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2720 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: Mon, 21 May 2018 17:28:54 -0000 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 "rem= ove" > function, because of a deadlock. >=20 > The lock is now only protecting the device list inside the bus driver. >=20 > Fixes: 35f462839b69 ("bus/vdev: add lock on device list") >=20 > Signed-off-by: Thomas Monjalon Tested-by: Matan Azrad