Commit 83ffc5e8 authored by Eli Cohen's avatar Eli Cohen Committed by Pengyuan Zhao
Browse files

vdpa: Fix error logic in vdpa_nl_cmd_dev_get_doit

mainline inclusion
from mainline-v5.19-rc1
commit 7a6691f1
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7a6691f1f89784f775fa0c54be57533445726068



----------------------------------------------------------------------

In vdpa_nl_cmd_dev_get_doit(), if the call to genlmsg_reply() fails we
must not call nlmsg_free() since this is done inside genlmsg_reply().

Fix it.

Fixes: bc0d90ee ("vdpa: Enable user to query vdpa device info")
Reviewed-by: default avatarSi-Wei Liu <si-wei.liu@oracle.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
Message-Id: <20220518133804.1075129-2-elic@nvidia.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarPengyuan Zhao <zhaopengyuan@hisilicon.com>
parent 14194a09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment