Correct merge-o: make sure to unlock symmetrically socket buffer
locks on bluetooth sockets when clearing upcall flags. Submitted by: emax
This commit is contained in:
parent
a49a3b3d09
commit
68548aa4c6
@ -1327,10 +1327,10 @@ ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp,
|
||||
l2so->so_upcall = NULL;
|
||||
SOCKBUF_LOCK(&l2so->so_rcv);
|
||||
l2so->so_rcv.sb_flags &= ~SB_UPCALL;
|
||||
SOCKBUF_LOCK(&l2so->so_rcv);
|
||||
SOCKBUF_UNLOCK(&l2so->so_rcv);
|
||||
SOCKBUF_LOCK(&l2so->so_snd);
|
||||
l2so->so_snd.sb_flags &= ~SB_UPCALL;
|
||||
SOCKBUF_LOCK(&l2so->so_snd);
|
||||
SOCKBUF_UNLOCK(&l2so->so_snd);
|
||||
l2so->so_state &= ~SS_NBIO;
|
||||
|
||||
mtx_destroy(&s->session_mtx);
|
||||
|
Loading…
Reference in New Issue
Block a user