On Tue, Oct 22, 2024 at 04:07:50PM GMT, Shakeel Butt wrote: > On Mon, Oct 14, 2024 at 05:49:56PM GMT, Martin KaFai Lau wrote: > > From: Martin KaFai Lau <martin.lau@xxxxxxxxxx> [...] > > + > > + err = pin_user_pages_fast(start, 1, FOLL_LONGTERM | FOLL_WRITE, &page); > > + if (err != 1) > > + goto unpin_all; > > + > > + *uptr_addr = page_address(page) + offset_in_page(start); > > Please use kmap(page) instead of page_address(page) and then you will > need to kunmap(kptr) on the unpin side. > This is needed only if you plan to support your feature for HIGHMEM kernels though. Otherwise you can error out for PageHighMem(page).