X-Git-Url: https://git.proxmox.com/?p=pve-qemu-kvm.git;a=blobdiff_plain;f=debian%2Fpatches%2Fextra%2FCVE-2016-9915-9pfs-add-cleanup-operation-for-handle-backend-driver.patch;fp=debian%2Fpatches%2Fextra%2FCVE-2016-9915-9pfs-add-cleanup-operation-for-handle-backend-driver.patch;h=0000000000000000000000000000000000000000;hp=cc78623e1eca4c96b6e2025f40f86f3b9e356042;hb=1a91ab45b7b886b5a4d2b12a559e4b239eccceed;hpb=e9748910af967b15cce8c312fc50589065fca911 diff --git a/debian/patches/extra/CVE-2016-9915-9pfs-add-cleanup-operation-for-handle-backend-driver.patch b/debian/patches/extra/CVE-2016-9915-9pfs-add-cleanup-operation-for-handle-backend-driver.patch deleted file mode 100644 index cc78623..0000000 --- a/debian/patches/extra/CVE-2016-9915-9pfs-add-cleanup-operation-for-handle-backend-driver.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 4196726e44c437793294af15d95e53164cf9a02d Mon Sep 17 00:00:00 2001 -From: Li Qiang -Date: Wed, 23 Nov 2016 13:53:34 +0100 -Subject: [PATCH 08/12] 9pfs: add cleanup operation for handle backend driver - -In the init operation of handle backend dirver, it allocates a -handle_data struct and opens a mount file. We should free these -resources when the 9pfs device is unrealized. This is what this -patch does. - -Signed-off-by: Li Qiang -Reviewed-by: Greg Kurz -Signed-off-by: Greg Kurz ---- - hw/9pfs/9p-handle.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/hw/9pfs/9p-handle.c b/hw/9pfs/9p-handle.c -index 3d77594..1687661 100644 ---- a/hw/9pfs/9p-handle.c -+++ b/hw/9pfs/9p-handle.c -@@ -649,6 +649,14 @@ out: - return ret; - } - -+static void handle_cleanup(FsContext *ctx) -+{ -+ struct handle_data *data = ctx->private; -+ -+ close(data->mountfd); -+ g_free(data); -+} -+ - static int handle_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse) - { - const char *sec_model = qemu_opt_get(opts, "security_model"); -@@ -671,6 +679,7 @@ static int handle_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse) - FileOperations handle_ops = { - .parse_opts = handle_parse_opts, - .init = handle_init, -+ .cleanup = handle_cleanup, - .lstat = handle_lstat, - .readlink = handle_readlink, - .close = handle_close, --- -2.1.4 -