[dpdk-dev] [PATCH] ethdev: fix secondary process change share memory

方统浩50450 fangtonghao at sangfor.com.cn
Mon Jan 13 04:02:42 CET 2020


secondary process will enter rte_eth_copy_pci_info function when initializing.
rte_eth_dev_pci_copy_info -> rte_eth_copy_pci_info




发件人:Stephen Hemminger <stephen at networkplumber.org>
发送日期:2020-01-10 23:32:15
收件人:Fang TongHao <fangtonghao at sangfor.com.cn>
抄送人:thomas at monjalon.net,ferruh.yigit at intel.com,arybchenko at solarflare.com,dev at dpdk.org,stable at dpdk.org,cunming.liang at intel.com,jia.guo at intel.com
主题:Re: [dpdk-dev] [PATCH] ethdev: fix secondary process change share memory>On Thu,  9 Jan 2020 11:14:25 +0800
>Fang TongHao <fangtonghao at sangfor.com.cn> wrote:
>
>> Hi all,I 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.
>> 
>> Signed-off-by: Fang TongHao <fangtonghao at sangfor.com.cn>
>
>Most of the drivers avoid calling rte_eth_dev_pci_copy_info
>in the secondary process, which one are you using?






More information about the dev mailing list