[dpdk-dev] [PATCH v2] dev: fix attach rollback of a device that was already attached

Thomas Monjalon thomas at monjalon.net
Sun Nov 25 13:25:18 CET 2018


23/11/2018 22:26, Darek Stojaczyk:
> When primary process receives an IPC attach request
> of a device that's already locally-attached, it
> doesn't setup its variables properly and is prone to
> segfaulting on a subsequent rollback.
> 
> `ret = local_dev_probe(req->devargs, &dev)`
> 
> The above function will set `dev` pointer to the
> proper device *unless* it returns with error. One of
> those errors is -EEXIST, which the hotplug function
> explicitly ignores. For -EEXIST, it proceeds with
> attaching the device and expects the dev pointer to
> be valid.
> 
> This patch makes `local_dev_probe` set the dev pointer
> even if it returns -EEXIST.
> 
> Fixes: ac9e4a17370f ("eal: support attach/detach shared device from secondary")
> Cc: qi.z.zhang at intel.com
> 
> Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk at intel.com>

Applied, thanks





More information about the dev mailing list