public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC patch] vsprintf: Add %pav extension for print_vma_addr
Date: Wed, 27 May 2015 14:19:08 -0700	[thread overview]
Message-ID: <20150527141908.4cf02ef4456201ad7db78883@linux-foundation.org> (raw)
In-Reply-To: <1432760971.2846.180.camel@perches.com>

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.

  reply	other threads:[~2015-05-27 21:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 23:05 [RFC patch] vsprintf: Add %pav extension for print_vma_addr Joe Perches
2015-05-27 21:04 ` Andrew Morton
2015-05-27 21:09   ` Joe Perches
2015-05-27 21:19     ` Andrew Morton [this message]
2015-05-31 17:51       ` Joe Perches
2015-06-01 23:36         ` Andrew Morton

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=20150527141908.4cf02ef4456201ad7db78883@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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