kcm: Fix locking issue
Lock the lower socket in kcm_unattach. Release during call to strp_done since that function cancels the RX timers and work queue with sync. Also added some status information in psock reporting. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cff6a334e6
commit
1616b38f20
@@ -173,14 +173,24 @@ static void kcm_format_psock(struct kcm_psock *psock, struct seq_file *seq,
|
||||
if (psock->strp.rx_stopped)
|
||||
seq_puts(seq, "RxStop ");
|
||||
|
||||
if (psock->strp.rx_paused)
|
||||
seq_puts(seq, "RxPause ");
|
||||
|
||||
if (psock->tx_kcm)
|
||||
seq_printf(seq, "Rsvd-%d ", psock->tx_kcm->index);
|
||||
|
||||
if (psock->ready_rx_msg)
|
||||
seq_puts(seq, "RdyRx ");
|
||||
if (!psock->strp.rx_paused && !psock->ready_rx_msg) {
|
||||
if (psock->sk->sk_receive_queue.qlen) {
|
||||
if (psock->strp.rx_need_bytes)
|
||||
seq_printf(seq, "RxWait=%u ",
|
||||
psock->strp.rx_need_bytes);
|
||||
else
|
||||
seq_printf(seq, "RxWait ");
|
||||
}
|
||||
} else {
|
||||
if (psock->strp.rx_paused)
|
||||
seq_puts(seq, "RxPause ");
|
||||
|
||||
if (psock->ready_rx_msg)
|
||||
seq_puts(seq, "RdyRx ");
|
||||
}
|
||||
|
||||
seq_puts(seq, "\n");
|
||||
}
|
||||
|
Reference in New Issue
Block a user