]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vdpa: Fix error logic in vdpa_nl_cmd_dev_get_doit
authorEli Cohen <elic@nvidia.com>
Wed, 18 May 2022 13:37:59 +0000 (16:37 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:23 +0000 (18:41 +0200)
commitbfc70acd49037118084fd50b47953e20b1336c4a
tree5af9905d8792d51c21b80bf5d2e9214f7c790d1b
parent601c9086845822a6e67fcbcd4b5e659003cb6a06
vdpa: Fix error logic in vdpa_nl_cmd_dev_get_doit

[ Upstream commit 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: bc0d90ee021f ("vdpa: Enable user to query vdpa device info")
Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20220518133804.1075129-2-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/vdpa/vdpa.c