Re: [PATCH v3] staging: kpc2000: Convert put_page to put_user_page*()

From: John Hubbard
Date: Fri Jul 19 2019 - 17:05:27 EST


On 7/19/19 1:59 PM, Matt Sickler wrote:
>> From: Bharath Vedartham <linux.bhar@xxxxxxxxx>
>> Changes since v2
>> - Added back PageResevered check as suggested by John Hubbard.
>>
>> The PageReserved check needs a closer look and is not worth messing
>> around with for now.
>>
>> Matt, Could you give any suggestions for testing this patch?
>
> Myself or someone else from Daktronics would have to do the testing since the
> hardware isn't really commercially available. I've been toying with the idea
> of asking for a volunteer from the mailing list to help me out with this - I'd
> send them some hardware and they'd do all the development and testing. :)
> I still have to run that idea by Management though.
>
>> If in-case, you are willing to pick this up to test. Could you
>> apply this patch to this tree and test it with your devices?
>
> I've been meaning to get to testing the changes to the drivers since upstreaming
> them, but I've been swamped with other development. I'm keeping an eye on the
> mailing lists, so I'm at least aware of what is coming down the pipe.
> I'm not too worried about this specific change, even though I don't really know
> if the reserved check and the dirtying are even necessary.
> It sounded like John's suggestion was to not do the PageReserved() check and just
> use put_user_pges_dirty() all the time. John, is that incorrect?
>

That's what I suggested at first. But then I saw at least one other place where
this pattern is being used, and it shook my confidence. I don't clearly see what
the PageReserved check is protecting against here, but it's better to be
safe, and do things in two steps: step 1 is *only* convert from put_page()
to put_user_page(), and step 2 is to maybe remove the PageReserved() check,
once fully understood.


thanks,
--
John Hubbard
NVIDIA