[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 20/34] xen: convert put_page() to put_user_page*()
- To: "Weiny, Ira" <ira.weiny@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "john.hubbard@xxxxxxxxx" <john.hubbard@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
- From: John Hubbard <jhubbard@xxxxxxxxxx>
- Date: Fri, 2 Aug 2019 12:25:01 -0700
- Cc: "linux-fbdev@xxxxxxxxxxxxxxx" <linux-fbdev@xxxxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, "sparclinux@xxxxxxxxxxxxxxx" <sparclinux@xxxxxxxxxxxxxxx>, "Williams, Dan J" <dan.j.williams@xxxxxxxxx>, "devel@xxxxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxxxx>, "rds-devel@xxxxxxxxxxxxxx" <rds-devel@xxxxxxxxxxxxxx>, "linux-rdma@xxxxxxxxxxxxxxx" <linux-rdma@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "amd-gfx@xxxxxxxxxxxxxxxxxxxxx" <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "devel@xxxxxxxxxxxxxxxxxx" <devel@xxxxxxxxxxxxxxxxxx>, "linux-media@xxxxxxxxxxxxxxx" <linux-media@xxxxxxxxxxxxxxx>, "intel-gfx@xxxxxxxxxxxxxxxxxxxxx" <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, Jérôme Glisse <jglisse@xxxxxxxxxx>, "linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx" <linux-rpi-kernel@xxxxxxxxxxxxxxxxxxx>, "ceph-devel@xxxxxxxxxxxxxxx" <ceph-devel@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-nfs@xxxxxxxxxxxxxxx" <linux-nfs@xxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, "linux-xfs@xxxxxxxxxxxxxxx" <linux-xfs@xxxxxxxxxxxxxxx>, "linux-crypto@xxxxxxxxxxxxxxx" <linux-crypto@xxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>
- Delivery-date: Fri, 02 Aug 2019 19:26:57 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 8/2/19 9:09 AM, Weiny, Ira wrote:
On 02.08.19 07:48, John Hubbard wrote:
On 8/1/19 9:36 PM, Juergen Gross wrote:
On 02.08.19 04:19, john.hubbard@xxxxxxxxx wrote:
From: John Hubbard <jhubbard@xxxxxxxxxx>
...
If that's not the case (both here, and in 3 or 4 other patches in this
series, then as you said, I should add NULL checks to put_user_pages()
and put_user_pages_dirty_lock().
In this case it is not correct, but can easily be handled. The NULL case can
occur only in an error case with the pages array filled partially or not at all.
I'd prefer something like the attached patch here.
I'm not an expert in this code and have not looked at it carefully but that
patch does seem to be the better fix than forcing NULL checks on everyone.
OK, I'll use Juergen's approach, and also check for that pattern in the
other patches.
thanks,
--
John Hubbard
NVIDIA
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|