Messages in this thread | | | Date | Wed, 27 May 2015 14:19:08 -0700 | From | Andrew Morton <> | Subject | Re: [RFC patch] vsprintf: Add %pav extension for print_vma_addr |
| |
On Wed, 27 May 2015 14:09:31 -0700 Joe Perches <joe@perches.com> wrote:
> > Problems when CONFIG_PREEMPT=n. > > > > > + down_read(&mm->mmap_sem); > > > + vma = find_vma(mm, ip); > > > + if (vma && vma->vm_file) { > > > + struct file *f = vma->vm_file; > > > + char *gfp_buf = (char *)__get_free_page(GFP_KERNEL); > > > > We shouldn't assume we can use GFP_KERNEL here. Even if the > > preempt_count() worked, we might be in a context which requires > > GFP_NOFS or GFP_NOIO. > > This code is basically a copy of the existing print_vma_addr() > so is that true for all the existing uses too?
Yeah, the current code is pretty junky. But normally print_vma_addr() should never be called so nobody noticed...
In e8bff74a Ingo did a fiddle to preempt_conditional_sti() which looks like it will address the CONFIG_PREEMPT=n issue, but only on x86.
| |