]> git.proxmox.com Git - pve-qemu-kvm.git/blob - debian/patches/0001-rng-remove-the-unused-request-cancellation-code.patch
Fix CVE-2016-2841, CVE-2016-2857, CVE-2016-2858
[pve-qemu-kvm.git] / debian / patches / 0001-rng-remove-the-unused-request-cancellation-code.patch
1 From d615099455e3a6cc71c17182cabd851d4340354d Mon Sep 17 00:00:00 2001
2 From: Ladi Prosek <lprosek@redhat.com>
3 Date: Thu, 3 Mar 2016 09:37:15 +0100
4 Subject: [PATCH 1/5] rng: remove the unused request cancellation code
5
6 rng_backend_cancel_requests had no callers and none of the code
7 deleted in this commit ever ran.
8
9 Signed-off-by: Ladi Prosek <lprosek@redhat.com>
10 Reviewed-by: Amit Shah <amit.shah@redhat.com>
11 Message-Id: <1456994238-9585-2-git-send-email-lprosek@redhat.com>
12 Signed-off-by: Amit Shah <amit.shah@redhat.com>
13 ---
14 backends/rng-egd.c | 12 ------------
15 backends/rng.c | 9 ---------
16 include/sysemu/rng.h | 11 -----------
17 3 files changed, 32 deletions(-)
18
19 diff --git a/backends/rng-egd.c b/backends/rng-egd.c
20 index 6c13409..3c6362e 100644
21 --- a/backends/rng-egd.c
22 +++ b/backends/rng-egd.c
23 @@ -124,17 +124,6 @@ static void rng_egd_free_requests(RngEgd *s)
24 s->requests = NULL;
25 }
26
27 -static void rng_egd_cancel_requests(RngBackend *b)
28 -{
29 - RngEgd *s = RNG_EGD(b);
30 -
31 - /* We simply delete the list of pending requests. If there is data in the
32 - * queue waiting to be read, this is okay, because there will always be
33 - * more data than we requested originally
34 - */
35 - rng_egd_free_requests(s);
36 -}
37 -
38 static void rng_egd_opened(RngBackend *b, Error **errp)
39 {
40 RngEgd *s = RNG_EGD(b);
41 @@ -212,7 +201,6 @@ static void rng_egd_class_init(ObjectClass *klass, void *data)
42 RngBackendClass *rbc = RNG_BACKEND_CLASS(klass);
43
44 rbc->request_entropy = rng_egd_request_entropy;
45 - rbc->cancel_requests = rng_egd_cancel_requests;
46 rbc->opened = rng_egd_opened;
47 }
48
49 diff --git a/backends/rng.c b/backends/rng.c
50 index 5065fdc..5d1876c 100644
51 --- a/backends/rng.c
52 +++ b/backends/rng.c
53 @@ -25,15 +25,6 @@ void rng_backend_request_entropy(RngBackend *s, size_t size,
54 }
55 }
56
57 -void rng_backend_cancel_requests(RngBackend *s)
58 -{
59 - RngBackendClass *k = RNG_BACKEND_GET_CLASS(s);
60 -
61 - if (k->cancel_requests) {
62 - k->cancel_requests(s);
63 - }
64 -}
65 -
66 static bool rng_backend_prop_get_opened(Object *obj, Error **errp)
67 {
68 RngBackend *s = RNG_BACKEND(obj);
69 diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
70 index 0a27c9b..c7da17d 100644
71 --- a/include/sysemu/rng.h
72 +++ b/include/sysemu/rng.h
73 @@ -38,7 +38,6 @@ struct RngBackendClass
74
75 void (*request_entropy)(RngBackend *s, size_t size,
76 EntropyReceiveFunc *receive_entropy, void *opaque);
77 - void (*cancel_requests)(RngBackend *s);
78
79 void (*opened)(RngBackend *s, Error **errp);
80 };
81 @@ -69,14 +68,4 @@ struct RngBackend
82 void rng_backend_request_entropy(RngBackend *s, size_t size,
83 EntropyReceiveFunc *receive_entropy,
84 void *opaque);
85 -
86 -/**
87 - * rng_backend_cancel_requests:
88 - * @s: the backend to cancel all pending requests in
89 - *
90 - * Cancels all pending requests submitted by @rng_backend_request_entropy. This
91 - * should be used by a device during reset or in preparation for live migration
92 - * to stop tracking any request.
93 - */
94 -void rng_backend_cancel_requests(RngBackend *s);
95 #endif
96 --
97 2.1.4
98