Commit 05a6afbb authored by Jan Kiszka's avatar Jan Kiszka
Browse files

drivers/ipc: bufp: Add missing initialization of rdsem/wrsem

This caused random values in those vars, and that led to premature
leaving of __bufp_readbuf and __bufp_writebuf with waiter states not
properly updated, e.g.

Fixes: 0a67a85b

 ("drivers/ipc: bufp: fix rd/rd and wr/wr races")
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 76dca51a
......@@ -120,6 +120,8 @@ static int bufp_socket(struct rtdm_fd *fd)
sk->fillsz = 0;
sk->rdrsvd = 0;
sk->wrrsvd = 0;
sk->rdsem = 0;
sk->wrsem = 0;
sk->status = 0;
sk->handle = 0;
sk->rx_timeout = RTDM_TIMEOUT_INFINITE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment