On 06/02/19 13:49, Daniel P. Berrangé wrote: > On Wed, Feb 06, 2019 at 02:43:45PM +0200, Alberto Garcia wrote: >> There's a race condition in which the tcp_chr_read() ioc handler can >> close a connection that is being written to from another thread. > Isn't the chardev only ever supposed to be read/written from a > single thread. >
No, writes from multiple threads are allowed; of course they have to have proper locking to avoid mixing messages. Reads have to happen from a single thread because they are tied to the chr_read handlers. Paolo