[dpdk-stable] [dpdk-dev] [PATCH] eal/linux: fix multi-process cannot work

Thomas Monjalon thomas.monjalon at 6wind.com
Tue Apr 4 11:58:39 CEST 2017


2017-03-29 16:19, Sergio Gonzalez Monroy:
> On 16/03/2017 16:28, Jianfeng Tan wrote:
> > When binding with vfio-pci, secondary process cannot be started with
> > an error message:
> >
> >      cannot find TAILQ entry for PCI device.
> >
> > It's due to: struct rte_pci_addr is padded with 1 byte for alignment
> > by compiler. Then below comparison in commit 2f4adfad0a69
> > ("vfio: add multiprocess support") will fail if the last byte is not
> > initialized.
> >
> >      memcmp(&vfio_res->pci_addr, &dev->addr, sizeof(dev->addr)
> >
> > And commit cdc242f260e7 ("eal/linux: support running as unprivileged user")
> > just triggers this bug by using a stack un-initialized variable.
> >
> > The fix is to use rte_eal_compare_pci_addr() for pci addr comparison.
> >
> > Fixes: 2f4adfad0a69 ("vfio: add multiprocess support")
> > Fixes: cdc242f260e7 ("eal/linux: support running as unprivileged user")
> > CC: stable at dpdk.org
> >
> > Reported-by: Rutkowski, Pawel <pawelx.rutkowski at intel.com>
> > Signed-off-by: Jianfeng Tan <jianfeng.tan at intel.com>
> 
> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>

Applied, thanks


More information about the stable mailing list