On 09.09.22 13:53, Linus Torvalds wrote:
On Fri, Sep 9, 2022 at 6:52 AM Alex Williamson
<alex.williamson@xxxxxxxxxx> wrote:
VFIO fix for v6.0-rc5
- Fix zero page refcount leak (Alex Williamson)
Ugh. This is disgusting.
Don't get me wrong - I've pulled this, but I think there's some deeper
problem that made this patch required.
Why is pin_user_pages_remote() taking a reference to a reserved page?
Maybe it just shouldn't (and then obviously we should fix the unpin
case to match too).
Adding a few GUP people to the participants for comments.
Anybody?
I mentioned in an offline discussion to Alex that we should teach the
pin/unpin interface to not mess with the zeropage at all (i.e., not
adjust the refcount and eventually overflow it).
We decided that the unbalanced pin/unpin should be fixed independently,
such that the refcount handling change on pin/unpin stays GUP internal.
--
Thanks,
David / dhildenb