From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Mel Gorman <mgorman@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Andrew Morton <akpm@google.com>, Dave Jones <davej@redhat.com>,
Christoph Lameter <cl@linux.com>,
stable@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>,
Miao Xie <miaox@cn.fujitsu.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 5/6] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()
Date: Tue, 12 Jun 2012 12:31:29 -0400 [thread overview]
Message-ID: <CAHGf_=omc4g_JHu+mr-HKmoH=juhcXKgPGOKamAOrJCWkbdEMQ@mail.gmail.com> (raw)
In-Reply-To: <20120612142012.GB20467@suse.de>
> Why does dequeue_huge_page_vma() not need to be changed as well? It's
> currently using mpol_cond_put() but if there is a goto retry_cpuset then
> will it have not take an additional reference count and leak?
dequeue_huge_page_vma() also uses get_vma_policy() and mpol_cond_put()
pair. thus we don't need special concern.
> Would it be more straight forward to put the mpol_cond_put() and __mpol_put()
> calls after the "goto retry_cpuset" checks instead?
I hope to keep symmetric. Sane design prevent a lot of unintentional breakage.
Frankly says, now all caller assume the symmetric. It's natural.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2012-06-12 16:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 9:17 [PATCH 0/6][resend] mempolicy memory corruption fixlet kosaki.motohiro
2012-06-11 9:17 ` [PATCH 1/6] Revert "mm: mempolicy: Let vma_merge and vma_split handle vma->vm_policy linkages" kosaki.motohiro
2012-06-11 14:43 ` Christoph Lameter
2012-06-11 9:17 ` [PATCH 2/6] mempolicy: remove all mempolicy sharing kosaki.motohiro
2012-06-11 15:02 ` Christoph Lameter
2012-06-12 16:46 ` KOSAKI Motohiro
2012-06-12 13:55 ` Mel Gorman
2012-06-12 16:45 ` KOSAKI Motohiro
2012-06-11 9:17 ` [PATCH 3/6] mempolicy: fix a race in shared_policy_replace() kosaki.motohiro
2012-06-11 9:17 ` [PATCH 4/6] mempolicy: fix refcount leak in mpol_set_shared_policy() kosaki.motohiro
2012-06-11 9:17 ` [PATCH 5/6] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() kosaki.motohiro
2012-06-11 13:33 ` Ben Hutchings
2012-06-11 15:24 ` KOSAKI Motohiro
2012-06-12 14:20 ` Mel Gorman
2012-06-12 16:31 ` KOSAKI Motohiro [this message]
2012-06-11 9:17 ` [PATCH 6/6] MAINTAINERS: Added MEMPOLICY entry kosaki.motohiro
2012-06-11 15:01 ` [PATCH 0/6][resend] mempolicy memory corruption fixlet Christoph Lameter
2012-07-31 12:33 ` Josh Boyer
2012-08-06 19:32 ` KOSAKI Motohiro
2012-08-15 11:40 ` Josh Boyer
2012-08-15 20:20 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2012-05-30 9:02 [PATCH 0/6] " kosaki.motohiro
2012-05-30 9:02 ` [PATCH 5/6] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() kosaki.motohiro
2012-05-30 20:37 ` Andi Kleen
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='CAHGf_=omc4g_JHu+mr-HKmoH=juhcXKgPGOKamAOrJCWkbdEMQ@mail.gmail.com' \
--to=kosaki.motohiro@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=miaox@cn.fujitsu.com \
--cc=stable@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