Skip to contentSkip to conversation

can: purge socket error queue on sock destruct

PATCH New Willem de Bruijn 1 participant 1 message Jun 7, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: purge socket error queue on sock destruct

From: Willem de Bruijn <[email protected]>

CAN supports software tx timestamps as of the below commit. Purge any queued timestamp packets on socket destroy.

Fixes 51f31cabe3ce ("ip: support for TX timestamps on UDP and RAW sockets")
Reported-by [email protected]
---
 net/can/af_can.c | 1 +
 1 file changed, 1 insertion(+)
net/can/af_can.c +1 -0
index e8fd5dc1780ae..189a6bf8f829c 100644
@@ -99,6 +99,7 @@ EXPORT_SYMBOL(can_ioctl);
 static void can_sock_destruct(struct sock *sk)
 {
 	skb_queue_purge(&sk->sk_receive_queue);
+	skb_queue_purge(&sk->sk_error_queue);
 }
 
 static const struct can_proto *can_get_proto(int protocol)
Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog