[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20201118142725.aa4678810546c70520dd5d74@linux-foundation.org>
Date: Wed, 18 Nov 2020 14:27:25 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: christian.koenig@....com
Cc: Christian König
<ckoenig.leichtzumerken@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linaro-mm-sig@...ts.linaro.org,
dri-devel@...ts.freedesktop.org, linux-media@...r.kernel.org
Subject: Re: [PATCH 1/2] mm: mmap: fix fput in error path v2
On Wed, 18 Nov 2020 11:57:44 +0100 Christian König <ckoenig.leichtzumerken@...il.com> wrote:
> Am 06.11.20 um 23:48 schrieb Andrew Morton:
> > On Fri, 6 Nov 2020 12:48:05 +0100 "Christian König" <ckoenig.leichtzumerken@...il.com> wrote:
> >
> >> Patch "495c10cc1c0c CHROMIUM: dma-buf: restore args..."
> >> adds a workaround for a bug in mmap_region.
> >>
> >> As the comment states ->mmap() callback can change
> >> vma->vm_file and so we might call fput() on the wrong file.
> >>
> >> Revert the workaround and proper fix this in mmap_region.
> >>
> > Seems correct, best I can tell. Presumably all ->mmap() instances will
> > correctly fput() to original file* if they're rewriting vma->vm_file.
>
> Yes, exactly.
>
> Patch #2 provides a helper to make sure that everybody gets the
> get_file()/fput() correctly while updating vma->vm_file.
>
> Can I add your acked-by to the patches and push them upstream through
> drm-misc-next?
Please go ahead.
Acked-by: Andrew Morton <akpm@...ux-foundation.org>
Powered by blists - more mailing lists