public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Michel Lespinasse <walken@google.com>
Cc: Hugh Dickins <hughd@google.com>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Rik van Riel <riel@redhat.com>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: 3.9-rc5: Encountedred INFO: rcu_sched self-detected stall on CPU due to 09a9f1d27
Date: Mon, 29 Apr 2013 09:29:53 -0400	[thread overview]
Message-ID: <20130429132952.GA8204@redhat.com> (raw)
In-Reply-To: <CANN689EcqDg0xp+74SoQJYQMecU4z-WWdA+7FtM3Sc_R-uK=sg@mail.gmail.com>

On Mon, Apr 29, 2013 at 01:57:18AM -0700, Michel Lespinasse wrote:
> On Mon, Apr 15, 2013 at 6:27 PM, Hugh Dickins <hughd@google.com> wrote:
> > On Mon, 15 Apr 2013, Michel Lespinasse wrote:
> >> sys_brk() passes the length as the difference of two page aligned addresses, so it's fine. But vm_brk() doesn't - it calls do_brk() which page aligns the length, but then vm_brk passes the unaligned length to mm_populate().
> >>
> >> What do you think of the following ? len is already a PAGE_SIZE multiple when called from sys_brk()...
> >
> > Yes, that's good.
> >>
> >> diff --git a/mm/mmap.c b/mm/mmap.c
> >> index 0db0de1c2fbe..6af8b0d1c7db 100644
> >> --- a/mm/mmap.c
> >> +++ b/mm/mmap.c
> >> @@ -2557,10 +2557,6 @@ static unsigned long do_brk(unsigned long addr, unsigned long len)
> >>       pgoff_t pgoff = addr >> PAGE_SHIFT;
> >>       int error;
> >>
> >> -     len = PAGE_ALIGN(len);
> >> -     if (!len)
> >> -             return addr;
> >> -
> >>       flags = VM_DATA_DEFAULT_FLAGS | VM_ACCOUNT | mm->def_flags;
> >>
> >>       error = get_unmapped_area(NULL, addr, len, 0, MAP_FIXED);
> >> @@ -2643,6 +2639,10 @@ unsigned long vm_brk(unsigned long addr, unsigned long len)
> >>       unsigned long ret;
> >>       bool populate;
> >>
> >> +     len = PAGE_ALIGN(len);
> >> +     if (!len)
> >> +             return addr;
> >> +
> >>       down_write(&mm->mmap_sem);
> >>       ret = do_brk(addr, len);
> >>       populate = ((mm->def_flags & VM_LOCKED) != 0);
> 
> Vivek - what should I do with this change ? Do you want to take it as
> part of your series, or should I push to Linus/Andrew ?
> 
> All vm_brk calls are in elf and aout loaders, so I don' t think we can
> hit the issue without your changes. Still, it may be good to make
> vm_brk robust anyway.

Hi Michel,

Thanks for the fix. Sorry, could not respond earlier as I was away from
work.

This patch did fix the issue for me. I think it is a good idea to push
this fix to Andrew irrespective of my changes. My series is in RFC phase
and there are no guarantees whether patches will be accespected or not.

So please go ahead and send this fix to andrew for inclusion. 

Thanks
Vivek

  reply	other threads:[~2013-04-29 13:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 18:13 3.9-rc5: Encountedred INFO: rcu_sched self-detected stall on CPU due to 09a9f1d27 Vivek Goyal
2013-04-13  2:12 ` Michel Lespinasse
2013-04-13  2:31 ` Michel Lespinasse
2013-04-15 16:35   ` Vivek Goyal
2013-04-15 17:34     ` Vivek Goyal
2013-04-15 17:59       ` Vivek Goyal
2013-04-15 19:13         ` Vivek Goyal
2013-04-15 21:47           ` Hugh Dickins
2013-04-16  0:21             ` Michel Lespinasse
2013-04-16  1:27               ` Hugh Dickins
2013-04-29  8:57                 ` Michel Lespinasse
2013-04-29 13:29                   ` Vivek Goyal [this message]
2013-05-20 20:23                     ` Vivek Goyal

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=20130429132952.GA8204@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=riel@redhat.com \
    --cc=walken@google.com \
    /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