devargs: fix list entry update
authorXueming Li <xuemingl@nvidia.com>
Sat, 17 Apr 2021 15:15:32 +0000 (23:15 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 19 Apr 2021 16:13:02 +0000 (18:13 +0200)
commite4b5b2ba9c10b969f8d5dc91b1ddbf50ee621a66
treebe3dc3c0dbe76908b1cd1ed629265b5b9990bc3b
parent22677b0eef49ec30ef0facadee44b0084fc091ac
devargs: fix list entry update

When inserting devargs that is already in list,
existing one was reset and replaced completely by new one,
the entry info was lost during copy.

This patch backups entry info before copy.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Reported-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Xueming Li <xuemingl@nvidia.com>
lib/librte_eal/common/eal_common_devargs.c