netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] can: purge socket error queue on sock destruct
@ 2019-06-07 20:46 Willem de Bruijn
  0 siblings, 0 replies; only message in thread
From: Willem de Bruijn @ 2019-06-07 20:46 UTC (permalink / raw)
  To: netdev
  Cc: davem, linux-can, mkl, wg, patrick.ohly, Willem de Bruijn,
	syzbot+a90604060cb40f5bdd16

From: Willem de Bruijn <willemb@google.com>

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: syzbot+a90604060cb40f5bdd16@syzkaller.appspotmail.com
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
 net/can/af_can.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/can/af_can.c b/net/can/af_can.c
index e8fd5dc1780ae..189a6bf8f829c 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -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)
-- 
2.22.0.rc2.383.gf4fbbf30c2-goog


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-07 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-07 20:46 [PATCH net] can: purge socket error queue on sock destruct Willem de Bruijn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).