I'm not convinced that get_user_pages_remote is the right thing to use, and get_user_pages() is usable in 4.9+.
Note that the 'rw == READ' thing is very suspicious. That was the 'write' flag but we check if our mode is READ. In the new API it's a flag so the weirdness is even more obvious.
You should validate this is the right behaviour before merging - although it's worked fine for me, looking like this.
@philipl could you do a PR into the kernel_4_9_0 branch? I haven't had a chance to verify it yet so I'd like to get it into the repo but I'm not 100% comfortable putting it in master yet.
I'm not convinced that get_user_pages_remote is the right thing to use, and get_user_pages() is usable in 4.9+.
Note that the 'rw == READ' thing is very suspicious. That was the 'write' flag but we check if our mode is READ. In the new API it's a flag so the weirdness is even more obvious.
You should validate this is the right behaviour before merging - although it's worked fine for me, looking like this.