Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Hugh Dickins
On Tue, 4 Dec 2012, Hugh Dickins wrote: > > Yes, your patch fixes it Mel, but I prefer it as below, with a couple > of mods: removing the no longer true comment, and leaving shmem_swapin() > alone with just a comment. It appears to be the job of the rather weird > mpol_cond_copy() to drop the

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Hugh Dickins
On Tue, 4 Dec 2012, Mel Gorman wrote: > On Tue, Dec 04, 2012 at 02:54:08PM +0200, Tommi Rantala wrote: > > 2012/10/9 Mel Gorman : > > > commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. > > > > > > Commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier > > > related

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Mel Gorman
On Tue, Dec 04, 2012 at 02:54:08PM +0200, Tommi Rantala wrote: > 2012/10/9 Mel Gorman : > > commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. > > > > Commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier > > related damage v3") introduced a potential memory corruption. >

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Tommi Rantala
2012/10/9 Mel Gorman : > commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. > > Commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier > related damage v3") introduced a potential memory corruption. > shmem_alloc_page() uses a pseudo vma and it has one significant unique >

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Tommi Rantala
2012/10/9 Mel Gorman mgor...@suse.de: commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. Commit cc9a6c877661 (cpuset: mm: reduce large amounts of memory barrier related damage v3) introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Mel Gorman
On Tue, Dec 04, 2012 at 02:54:08PM +0200, Tommi Rantala wrote: 2012/10/9 Mel Gorman mgor...@suse.de: commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. Commit cc9a6c877661 (cpuset: mm: reduce large amounts of memory barrier related damage v3) introduced a potential memory

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Hugh Dickins
On Tue, 4 Dec 2012, Mel Gorman wrote: On Tue, Dec 04, 2012 at 02:54:08PM +0200, Tommi Rantala wrote: 2012/10/9 Mel Gorman mgor...@suse.de: commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. Commit cc9a6c877661 (cpuset: mm: reduce large amounts of memory barrier related damage

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-12-04 Thread Hugh Dickins
On Tue, 4 Dec 2012, Hugh Dickins wrote: Yes, your patch fixes it Mel, but I prefer it as below, with a couple of mods: removing the no longer true comment, and leaving shmem_swapin() alone with just a comment. It appears to be the job of the rather weird mpol_cond_copy() to drop the

[PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-10-09 Thread Mel Gorman
commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. Commit cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier related damage v3") introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant unique combination, vma->vm_ops=NULL and

[PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-10-09 Thread Mel Gorman
commit 00442ad04a5eac08a98255697c510e708f6082e2 upstream. Commit cc9a6c877661 (cpuset: mm: reduce large amounts of memory barrier related damage v3) introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant unique combination, vma-vm_ops=NULL and

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-09-07 Thread KOSAKI Motohiro
> mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() > > [cc9a6c87: cpuset: mm: reduce large amounts of memory barrier related damage > v3] introduced a potential memory corruption. shmem_alloc_page() uses a > pseudo vma and it has one significant unique combination,

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-09-07 Thread KOSAKI Motohiro
mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() [cc9a6c87: cpuset: mm: reduce large amounts of memory barrier related damage v3] introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant unique combination,

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-21 Thread Christoph Lameter
On Tue, 21 Aug 2012, Mel Gorman wrote: > mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() Reviewed-by: Christoph Lameter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-21 Thread Mel Gorman
On Mon, Aug 20, 2012 at 07:51:10PM +, Christoph Lameter wrote: > On Mon, 20 Aug 2012, Mel Gorman wrote: > > > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > > index 45f9825..82e872f 100644 > > --- a/mm/mempolicy.c > > +++ b/mm/mempolicy.c > > @@ -1545,15 +1545,28 @@ struct mempolicy

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-21 Thread Mel Gorman
On Mon, Aug 20, 2012 at 07:51:10PM +, Christoph Lameter wrote: On Mon, 20 Aug 2012, Mel Gorman wrote: diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 45f9825..82e872f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1545,15 +1545,28 @@ struct mempolicy

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-21 Thread Christoph Lameter
On Tue, 21 Aug 2012, Mel Gorman wrote: mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma() Reviewed-by: Christoph Lameter c...@linux.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-20 Thread Christoph Lameter
On Mon, 20 Aug 2012, Mel Gorman wrote: > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index 45f9825..82e872f 100644 > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -1545,15 +1545,28 @@ struct mempolicy *get_vma_policy(struct task_struct > *task, > struct vm_area_struct *vma,

[PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-20 Thread Mel Gorman
[cc9a6c87: cpuset: mm: reduce large amounts of memory barrier related damage v3] introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant unique combination, vma->vm_ops=NULL and vma->policy->flags & MPOL_F_SHARED. get_vma_policy() does NOT

[PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-20 Thread Mel Gorman
[cc9a6c87: cpuset: mm: reduce large amounts of memory barrier related damage v3] introduced a potential memory corruption. shmem_alloc_page() uses a pseudo vma and it has one significant unique combination, vma-vm_ops=NULL and vma-policy-flags MPOL_F_SHARED. get_vma_policy() does NOT increase a

Re: [PATCH 5/5] mempolicy: fix a memory corruption by refcount imbalance in alloc_pages_vma()

2012-08-20 Thread Christoph Lameter
On Mon, 20 Aug 2012, Mel Gorman wrote: diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 45f9825..82e872f 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -1545,15 +1545,28 @@ struct mempolicy *get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned