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 AB18EA04F9 for ; Fri, 10 Jan 2020 16:32:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 480EF1EB39; Fri, 10 Jan 2020 16:32:26 +0100 (CET) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 909AD1EB39 for ; Fri, 10 Jan 2020 16:32:24 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id g6so995618plt.2 for ; Fri, 10 Jan 2020 07:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=p56T31Ih0shL0Y7NYq3LYQ8p9PK0zIqwDlZhTQUXI1A=; b=Q9T5KZ7cEvGVLRMDTOIv6Pw0Ox3gFTwRS/OCOZRmbQCAnqR5KxkOpcA4RlX2aToDke dPRsddZucS20GzCZX25AqIcFr4nAkpZt8wvaBYUP/cS6oDCXc/KfhRco3FNz4EFgEBXR nl9qlQp8e8qGgqPIA6GJvT6+Hn5RAVqrLtwDxsFA0vwOkXp9kUNuAdQPAzljZ7wtkI5i SjgYYzJ2mJkZ6dNGLYkVvP8RFZVb2kOyCf4h9AOHQqrxSpqcng9tvXYF2xfxrJb3ibPq X70ZnX+KosphGzV+2/34j0YL/Gbhxfz2QQBeYNepNEJ8hkJMkJI1TGthL3l+c1ho9kLL qYBg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=p56T31Ih0shL0Y7NYq3LYQ8p9PK0zIqwDlZhTQUXI1A=; b=G80yPlYt0obfsNIRJuxUgpcFg5T+CcHH2MFYSsHBOprfSUPs6EQqZsfK4cEMBlBhAU ZR3xfUaciZqFCU26J6Nh/A/tm2FP97gXkUmHk5UReUXfBBq451WpPV2B7jrO7V3QXTp5 nhidfB5OLEXoEz4V6POSxjz58HBDty8BIUGOsxPJQkBZI0KyiDGqHuNyGJYtD7pkJf1I SykgAsVbduaMsudPE79Ry4Bih+9gbN6dWkqi4KcmRRIR5ZM1fIsrwhR+BWCcL6j57cWG 6nFycUMXsT5kyBevDdc9UzMR6oO2/tSTOpjuLmbjdIutsE+HdQCMuQboOdXyyTQH48kU 6D+Q== X-Gm-Message-State: APjAAAVzbyQ/cO3Pngt01c1T4eW0naIcaLFxK2mrW0noJ5WCpO40/5j3 6FFYaUej4DLzes8kFO5IZmj0vQ== X-Google-Smtp-Source: APXvYqyJwG/cbxDo0+1e2138dZ3VJ3tr5kHYXupFEpErR+PDXy0Uc2PlWHU1U4bEZ9OSKWr1uCk/Fg== X-Received: by 2002:a17:902:b210:: with SMTP id t16mr4902991plr.65.1578670343712; Fri, 10 Jan 2020 07:32:23 -0800 (PST) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id y6sm3321288pgc.10.2020.01.10.07.32.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2020 07:32:23 -0800 (PST) Date: Fri, 10 Jan 2020 07:32:15 -0800 From: Stephen Hemminger To: Fang TongHao Cc: thomas@monjalon.net, ferruh.yigit@intel.com, arybchenko@solarflare.com, dev@dpdk.org, stable@dpdk.org, cunming.liang@intel.com, jia.guo@intel.com Message-ID: <20200110073215.09ad9a6f@hermes.lan> In-Reply-To: <20200109031425.1338-1-fangtonghao@sangfor.com.cn> References: <20200109031425.1338-1-fangtonghao@sangfor.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix secondary process change share memory X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Thu, 9 Jan 2020 11:14:25 +0800 Fang TongHao wrote: > Hi all=EF=BC=8CI am from Sangfor Tech.I found a bug when using DPDK in > multiprocess scenario.The secondary process enters > "rte_eth_dev_pci_copy_info" function when initializing.Then it > sets the value of struct "rte_eth_dev_data.dev_flags" to zero, > but this struct is shared by primary process and secondary > process, and the value change is unexpected by primary process. > This may cause very serious damage.I think > the secondary process should not enter "rte_eth_dev_pci_copy_info" > function or changes the value of struct "rte_eth_dev_data.dev_flags" > in shared memory. > I fixed this bug by adding an if-statement to forbid the secondary > process changing the above-mentioned value. > Thansk, All. >=20 > Signed-off-by: Fang TongHao Most of the drivers avoid calling rte_eth_dev_pci_copy_info in the secondary process, which one are you using?