From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 1/2] iommu/amd: Avoid get_irq_table() from atomic context Date: Tue, 13 Feb 2018 14:13:39 +0100 Message-ID: <20180213131339.ytbgggbd6chdnlog@8bytes.org> References: <20180121092854.28290-1-swood@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180121092854.28290-1-swood-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Scott Wood Cc: "Luis Claudio R. Goncalves" , Clark Williams , iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Myron Stowe List-Id: iommu@lists.linux-foundation.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