-
Notifications
You must be signed in to change notification settings - Fork 2
/
seabios-zero-memory-before-use.patch
44 lines (36 loc) · 1.25 KB
/
seabios-zero-memory-before-use.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 24e9afba6b9ca7942c79c5f15208ea5416067b43 Mon Sep 17 00:00:00 2001
From: Gleb Natapov <gleb@redhat.com>
Date: Mon, 31 May 2010 13:04:20 -0300
Subject: [PATCH 2/2] zero memory before use
RH-Author: Gleb Natapov <gleb@redhat.com>
Message-id: <20100531130420.GA26913@redhat.com>
Patchwork-id: 9631
O-Subject: [PATCH SEABIOS RHEL6] zero memory before use
Bugzilla: 578752
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
RH-Acked-by: Glauber Costa <glommer@redhat.com>
RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Bugzilla-related: 596881
Zero virtio queue memory before use.
BZ: 596881
Upstream: non needed there, but in backport.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
--
Gleb.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
src/virtio-blk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/virtio-blk.c b/src/virtio-blk.c
index 14719c9..c7144b5 100644
--- a/src/virtio-blk.c
+++ b/src/virtio-blk.c
@@ -115,6 +115,7 @@ virtio_blk_setup(void)
u16 ioaddr = pci_config_readl(bdf, PCI_BASE_ADDRESS_0) &
PCI_BASE_ADDRESS_IO_MASK;
+ memset(vq, 0, sizeof(*vq));
memset(vdrive_g, 0, sizeof(*vdrive_g));
vdrive_g->ioaddr = ioaddr;
vdrive_g->vq = vq;
--
1.7.0.3