* [Qemu-devel] [PATCH] Fix an infinite loop in the emulated SB16 device
@ 2008-01-28 19:30 Aurelien Jarno
2008-01-29 16:54 ` malc
0 siblings, 1 reply; 2+ messages in thread
From: Aurelien Jarno @ 2008-01-28 19:30 UTC (permalink / raw)
To: qemu-devel
This patch from Tavis Ormandy <taviso@google.com> fixes an infinite
loop in the emulated SB16 device.
See http://taviso.decsystem.org/virtsec.pdf for more details.
---
hw/sb16.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/sb16.c b/hw/sb16.c
index c22de7a..b2a3a70 100644
--- a/hw/sb16.c
+++ b/hw/sb16.c
@@ -1246,8 +1246,10 @@ static int SB_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len)
s->block_size);
#endif
- while (s->left_till_irq <= 0) {
- s->left_till_irq = s->block_size + s->left_till_irq;
+ if (s->block_size) {
+ while (s->left_till_irq <= 0) {
+ s->left_till_irq = s->block_size + s->left_till_irq;
+ }
}
return dma_pos;
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix an infinite loop in the emulated SB16 device
2008-01-28 19:30 [Qemu-devel] [PATCH] Fix an infinite loop in the emulated SB16 device Aurelien Jarno
@ 2008-01-29 16:54 ` malc
0 siblings, 0 replies; 2+ messages in thread
From: malc @ 2008-01-29 16:54 UTC (permalink / raw)
To: qemu-devel
On Mon, 28 Jan 2008, Aurelien Jarno wrote:
> This patch from Tavis Ormandy <taviso@google.com> fixes an infinite
> loop in the emulated SB16 device.
>
> See http://taviso.decsystem.org/virtsec.pdf for more details.
> ---
> hw/sb16.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/sb16.c b/hw/sb16.c
> index c22de7a..b2a3a70 100644
> --- a/hw/sb16.c
> +++ b/hw/sb16.c
> @@ -1246,8 +1246,10 @@ static int SB_read_DMA (void *opaque, int nchan, int dma_pos, int dma_len)
> s->block_size);
> #endif
>
> - while (s->left_till_irq <= 0) {
> - s->left_till_irq = s->block_size + s->left_till_irq;
> + if (s->block_size) {
> + while (s->left_till_irq <= 0) {
> + s->left_till_irq = s->block_size + s->left_till_irq;
> + }
> }
>
> return dma_pos;
This was fixed by commit 'Mon Jan 14 04:24:29 2008 UTC (2 weeks, 1 day
ago) by balrog', and the fix is elaborated on in:
http://lists.gnu.org/archive/html/qemu-devel/2007-05/msg00038.html
http://lists.gnu.org/archive/html/qemu-devel/2007-05/msg00019.html
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-29 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 19:30 [Qemu-devel] [PATCH] Fix an infinite loop in the emulated SB16 device Aurelien Jarno
2008-01-29 16:54 ` malc
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).