OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a127c5b
)
vhost vdpa: fix vhost_vdpa_open error handling
author
Mike Christie
<michael.christie@oracle.com>
Mon, 21 Sep 2020 18:23:01 +0000
(13:23 -0500)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 30 Sep 2020 15:25:06 +0000
(11:25 -0400)
We must free the vqs array in the open failure path, because
vhost_vdpa_release will not be called.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link:
https://lore.kernel.org/r/1600712588-9514-2-git-send-email-michael.christie@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/vhost/vdpa.c
patch
|
blob
|
history
diff --git
a/drivers/vhost/vdpa.c
b/drivers/vhost/vdpa.c
index
796fe97
..
9a48439
100644
(file)
--- a/
drivers/vhost/vdpa.c
+++ b/
drivers/vhost/vdpa.c
@@
-810,6
+810,7
@@
static int vhost_vdpa_open(struct inode *inode, struct file *filep)
err_init_iotlb:
vhost_dev_cleanup(&v->vdev);
+ kfree(vqs);
err:
atomic_dec(&v->opened);
return r;