From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: mmap: fix fput in error path v2
Date: Wed, 18 Nov 2020 11:57:44 +0100 [thread overview]
Message-ID: <e5a25173-ebea-d856-ed25-45437769f17f@gmail.com> (raw)
In-Reply-To: <20201106144811.cf228ca9278ec78887d42960@linux-foundation.org>
Am 06.11.20 um 23:48 schrieb Andrew Morton:
> On Fri, 6 Nov 2020 12:48:05 +0100 "Christian König" <ckoenig.leichtzumerken@gmail.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?
Thanks,
Christian.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH 1/2] mm: mmap: fix fput in error path v2
Date: Wed, 18 Nov 2020 11:57:44 +0100 [thread overview]
Message-ID: <e5a25173-ebea-d856-ed25-45437769f17f@gmail.com> (raw)
In-Reply-To: <20201106144811.cf228ca9278ec78887d42960@linux-foundation.org>
Am 06.11.20 um 23:48 schrieb Andrew Morton:
> On Fri, 6 Nov 2020 12:48:05 +0100 "Christian König" <ckoenig.leichtzumerken@gmail.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?
Thanks,
Christian.
next prev parent reply other threads:[~2020-11-18 10:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-06 11:48 cleanup a fix and add the vma_set_file function Christian König
2020-11-06 11:48 ` Christian König
2020-11-06 11:48 ` [PATCH 1/2] mm: mmap: fix fput in error path v2 Christian König
2020-11-06 11:48 ` Christian König
2020-11-06 22:48 ` Andrew Morton
2020-11-06 22:48 ` Andrew Morton
2020-11-18 10:57 ` Christian König [this message]
2020-11-18 10:57 ` Christian König
2020-11-18 22:27 ` Andrew Morton
2020-11-18 22:27 ` Andrew Morton
2020-11-06 11:48 ` [PATCH 2/2] mm: introduce vma_set_file function v5 Christian König
2020-11-06 11:48 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2020-10-12 8:52 [PATCH 1/2] mm: mmap: fix fput in error path v2 Christian König
2020-10-12 8:52 ` Christian König
2020-10-16 16:13 ` Jason Gunthorpe
2020-10-16 16:13 ` Jason Gunthorpe
2020-11-04 8:03 ` Christian König
2020-11-04 8:03 ` Christian König
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=e5a25173-ebea-d856-ed25-45437769f17f@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.