chardev: fix race conditions for concurrent rd/wr
This is a long-standing bug, when more than one process access concurrently the char devices. This adds proper locking and solved the problem. Also, a new policy for writing control is in place: if you write control, any partial block (unless empty) is pushed to the pipeline. This matches the idea that after write(2) accepts data, it cannot be lost. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Federico Vaga <federico.vaga@gmail.com>
Showing
This diff is collapsed.
Please
register
or
sign in
to comment