Opening c2h channel with O_TRUNC option might cause the read syscall to return a random number.
Sometimes a read() syscall will be split into multiple transfers. When the O_TRUNC option is set, the driver flushes the results immediately after the first transfer, regardless of whether EOP is received or not.
Problem:
This PR tries to fix these problems I meet.