From: Kevin Wolf <kwolf@redhat.com>
To: P J P <ppandit@redhat.com>
Cc: Qemu Developers <qemu-devel@nongnu.org>,
qemu-block@nongnu.org, Chensongnian <chensongnian@huawei.com>,
Prasad J Pandit <pjp@fedoraproject.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v1] ide: check BlockBackend object in ide_cancel_dma_sync
Date: Mon, 17 Jul 2017 18:05:03 +0200 [thread overview]
Message-ID: <20170717160503.GL5301@noname.redhat.com> (raw)
In-Reply-To: <20170717130130.29211-1-ppandit@redhat.com>
Am 17.07.2017 um 15:01 hat P J P geschrieben:
> From: Prasad J Pandit <pjp@fedoraproject.org>
>
> When cancelling pending DMA requests in ide_cancel_dma_sync,
> the s->blk object could be null, leading to a null dereference.
> Add check to avoid it.
>
> blk_bs (blk=0x0) at block/block-backend.c:389
> blk_drain (blk=0x0) at block/block-backend.c:1232
> ide_cancel_dma_sync (s=0x7f203241c1a8) at hw/ide/core.c:684
> bmdma_cmd_writeb (bm=0x7f203241cf20, val=104) at hw/ide/pci.c:237
> bmdma_write (opaque=0x7f203241cf20, addr=0, val=104, size=1) at hw/ide/piix.c:77
>
> Reported-by: Chensongnian <chensongnian@huawei.com>
> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
> ---
> hw/ide/core.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Update: add call stack trace leading the null dereference.
I think Stefan didn't only mean a stack trace, but an actual instruction
how to reproduce this. VM configuration, what actions to take, etc.
In fact, I will add that we will probably want a qtest case as a
regression test anyway, and tests are always great for describing how to
reproduce a problem, too.
Kevin
next prev parent reply other threads:[~2017-07-17 16:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 13:01 [Qemu-devel] [PATCH v1] ide: check BlockBackend object in ide_cancel_dma_sync P J P
2017-07-17 16:05 ` Kevin Wolf [this message]
2017-07-18 6:55 ` [Qemu-devel] [Qemu-block] " P J P
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=20170717160503.GL5301@noname.redhat.com \
--to=kwolf@redhat.com \
--cc=chensongnian@huawei.com \
--cc=pjp@fedoraproject.org \
--cc=ppandit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.