From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Scott Wood <swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: "Luis Claudio R. Goncalves"
<lgoncalv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Clark Williams <williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
Myron Stowe <myron.stowe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/2] iommu/amd: Avoid get_irq_table() from atomic context
Date: Tue, 13 Feb 2018 14:13:39 +0100 [thread overview]
Message-ID: <20180213131339.ytbgggbd6chdnlog@8bytes.org> (raw)
In-Reply-To: <20180121092854.28290-1-swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Hi Scott,
On Sun, Jan 21, 2018 at 03:28:53AM -0600, Scott Wood wrote:
> The amd_iommu_rlookup_table[] check is not needed because
> irq_lookup_table[devid] should never be non-NULL if
> amd_iommu_rlookup_table[devid] is NULL.
Your reasoning is correct, but I'd like the patch make the code more
robust when accessing the irq_lookup_table directly.
Can you change rename get_irq_table() into something like
alloc_irq_table() and build a new get_irq_table() around the
irq_lookup_table access that throws a WARN_ON when the pointer is NULL?
Joerg
prev parent reply other threads:[~2018-02-13 13:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-21 9:28 [PATCH 1/2] iommu/amd: Avoid get_irq_table() from atomic context Scott Wood
[not found] ` <20180121092854.28290-1-swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-21 9:28 ` [PATCH 2/2] amd/iommu: Use raw locks on atomic context paths Scott Wood
[not found] ` <20180121092854.28290-2-swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-13 13:18 ` Joerg Roedel
2018-02-13 13:13 ` Joerg Roedel [this message]
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=20180213131339.ytbgggbd6chdnlog@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=lgoncalv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=myron.stowe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=williams-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.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).