[LTP] mbind() fails to fail with EIO

Qian Cai cai@lca.pw
Mon Mar 18 17:08:36 CET 2019


On Fri, 2019-03-15 at 17:01 +0100, Cyril Hrubis wrote:
> Hi!
> I've started to write tests for mbind() and found out that mbind() does
> not work as described in manual page in a case that page has been
> faulted on different node that we are asking it to bind to. Looks like
> this is working fine on older kernels. On my testing machine with 3.0
> mbind() fails correctly with EIO but succeeds unexpectedly on newer
> kernels such as 4.12.
> 
> What the test does is:
> 
> * mmap() private mapping
> * fault it
> * find out on which node it is faulted on
> * mbind() it to a different node with MPOL_BIND and MPOL_MF_STRICT and
>   expects to get EIO
> 
> The test code can be seen and compiled from:
> 
> https://github.com/metan-ucw/ltp/blob/master/testcases/kernel/syscalls/mbind/m
> bind02.c
> 

I am too lazy to checkout the repository and compile the whole thing just to be
able to reproduce. If you can make it a standalone program without LTP markups,
I'd be happy to take a look.


More information about the ltp mailing list