From: P J P <ppandit@redhat.com>
To: Li Qiang <liq3ea@gmail.com>
Cc: Ruhr-University <bugs-syssec@rub.de>,
"John Snow" <jsnow@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
qemu-block@nongnu.org, "QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] hw/ide: check null block before _cancel_dma_sync
Date: Fri, 18 Sep 2020 15:55:52 +0530 (IST) [thread overview]
Message-ID: <nycvar.YSQ.7.78.906.2009181427350.10832@xnncv> (raw)
In-Reply-To: <CAKXe6SLv1HX5_ty2SP5F_MkVKYO-tz5fNOKhpqZr0mH_ePypSA@mail.gmail.com>
+-- On Fri, 18 Sep 2020, Li Qiang wrote --+
| Update v2: use an assert() call
| ->https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg08336.html
...
| I think it is better to defer this check to 'ide_cancel_dma_sync'.
| 'ide_cancel_dma_sync' is also called by 'cmd_device_reset' and all of the
| handlers of 'ide_cmd_table' will check whether the 's->blk' is NULL in the
| beginning of 'ide_exec_cmd'.
|
| So I think it is reasonable to check 's->blk' at the begining of
| 'ide_cancel_dma_sync'.
* Yes, earlier patch v1 above does the same.
* From Peter's reply in another thread of similar issue I gather, issue is
setting 'blk' to NULL, even erroneously. So (blk == NULL) check should be
done where 'blk' is set to null, rather than where it is dereferenced.
* At the dereference point, assert(3) is good.
Thank you.
--
Prasad J Pandit / Red Hat Product Security Team
8685 545E B54C 486B C6EB 271E E285 8B5A F050 DE8D
next prev parent reply other threads:[~2020-09-18 10:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 18:31 [PATCH v2] hw/ide: check null block before _cancel_dma_sync P J P
2020-09-16 17:18 ` P J P
2020-09-18 4:30 ` Li Qiang
2020-09-18 10:25 ` P J P [this message]
2020-09-18 13:14 ` Li Qiang
2020-09-29 6:22 ` P J P
2020-09-29 14:53 ` Li Qiang
2020-09-30 4:26 ` 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=nycvar.YSQ.7.78.906.2009181427350.10832@xnncv \
--to=ppandit@redhat.com \
--cc=bugs-syssec@rub.de \
--cc=f4bug@amsat.org \
--cc=jsnow@redhat.com \
--cc=liq3ea@gmail.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).