Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

can: af_can: export can_sock_destruct()

In j1939 we need our own struct sock::sk_destruct callback. Export the
generic af_can can_sock_destruct() that allows us to chain-call it.

Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>

authored by

Oleksij Rempel and committed by
Marc Kleine-Budde
975987e7 5aa4277d

+3 -1
+1
include/linux/can/core.h
··· 65 65 void *data); 66 66 67 67 extern int can_send(struct sk_buff *skb, int loop); 68 + void can_sock_destruct(struct sock *sk); 68 69 69 70 #endif /* !_CAN_CORE_H */
+2 -1
net/can/af_can.c
··· 86 86 87 87 /* af_can socket functions */ 88 88 89 - static void can_sock_destruct(struct sock *sk) 89 + void can_sock_destruct(struct sock *sk) 90 90 { 91 91 skb_queue_purge(&sk->sk_receive_queue); 92 92 skb_queue_purge(&sk->sk_error_queue); 93 93 } 94 + EXPORT_SYMBOL(can_sock_destruct); 94 95 95 96 static const struct can_proto *can_get_proto(int protocol) 96 97 {