qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	jsnow@redhat.com, kwolf@redhat.com, mreitz@redhat.com,
	qemu-block@nongnu.org, qemu-devel@nongnu.org, martin@duskware.de
Subject: Re: [Qemu-devel] [PATCH for-3.1] fdc: fix segfault in fdctrl_stop_transfer() when DMA is disabled
Date: Mon, 12 Nov 2018 19:03:43 +0100	[thread overview]
Message-ID: <3a19b90b-71aa-36b2-4e30-867d29ac5683@reactos.org> (raw)
In-Reply-To: <20181111094023.18038-1-mark.cave-ayland@ilande.co.uk>

Le 11/11/2018 à 10:40, Mark Cave-Ayland a écrit :
> Commit c8a35f1cf0f "fdc: use IsaDma interface instead of global DMA_*
> functions" accidentally introduced a segfault in fdctrl_stop_transfer() for
> non-DMA transfers.
> 
> If fdctrl->dma_chann has not been configured then the fdctrl->dma interface
> reference isn't initialised during isabus_fdc_realize(). Unfortunately
> fdctrl_stop_transfer() unconditionally references the DMA interface when
> finishing the transfer causing a NULL pointer dereference.
> 
> Fix the issue by adding a check in fdctrl_stop_transfer() so that the DMA
> interface reference and release method is only invoked if fdctrl->dma_chann
> has been set.
> 
> (This issue was discovered by Martin testing a recent change in the NetBSD
> installer under qemu-system-sparc)
> 
> Reported-by: Martin Husemann <martin@duskware.de>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>

  parent reply	other threads:[~2018-11-12 18:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11  9:40 [Qemu-devel] [PATCH for-3.1] fdc: fix segfault in fdctrl_stop_transfer() when DMA is disabled Mark Cave-Ayland
2018-11-11 10:09 ` Philippe Mathieu-Daudé
2018-11-12 18:03 ` Hervé Poussineau [this message]
2018-11-12 19:58 ` John Snow
2018-11-13 13:16   ` Kevin Wolf
2018-11-13 20:29     ` John Snow
2018-11-18 12:32       ` Mark Cave-Ayland
2018-11-19 11:52         ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a19b90b-71aa-36b2-4e30-867d29ac5683@reactos.org \
    --to=hpoussin@reactos.org \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=martin@duskware.de \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).