From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH RESEND] iommu/amd: Fix BUG when faulting a PROT_NONE VMA Date: Wed, 14 Oct 2015 11:10:15 +0200 Message-ID: <20151014091015.GJ27420@8bytes.org> References: <1444729963-13815-1-git-send-email-jay@jcornwall.me> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1444729963-13815-1-git-send-email-jay-gJmSnxjMpeIFV7jr3Ov9Ew@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: Jay Cornwall Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org Hi Jay, On Tue, Oct 13, 2015 at 04:52:43AM -0500, Jay Cornwall wrote: > handle_mm_fault indirectly triggers a BUG in do_numa_page when given > a VMA without read/write/execute access. Check this condition in do_fault. > > do_fault -> handle_mm_fault -> handle_pte_fault -> do_numa_page > > mm/memory.c > 3147 static int do_numa_page(struct mm_struct *mm, struct vm_area_st... > .... > 3159 /* A PROT_NONE fault should not end up here */ > 3160 BUG_ON(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))); Thanks for the fix! Next time please Cc me directly on patches for AMD IOMMU code, so I see your patches earlier. Also this looks relevant for stable, can you find out which stable kernels need this fix too? Thanks, Joerg