History

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.

Oleksij Rempel committed 7 years ago

Commit 975987e1 parent 5aa42772 files · +3 −1Browse files

Unified · Split

2 files
  1. include/linux/can/core.h +1 −0
  2. net/can/af_can.c +2 −1
include/linux/can/core.h+1−0
@@ -65,5 +65,6 @@ extern void can_rx_unregister(struct net *net, struct net_device *dev, · 64 unmodified lines
6565 void *data);
6666
6767 extern int can_send(struct sk_buff *skb, int loop);
68+void can_sock_destruct(struct sock *sk);
6869
6970 #endif /* !_CAN_CORE_H */
net/can/af_can.c+2−1
@@ -86,11 +86,12 @@ static atomic_t skbcounter = ATOMIC_INIT(0); · 85 unmodified lines
8686
8787 /* af_can socket functions */
8888
89−static void can_sock_destruct(struct sock *sk)
89+void can_sock_destruct(struct sock *sk)
9090 {
9191 skb_queue_purge(&sk->sk_receive_queue);
9292 skb_queue_purge(&sk->sk_error_queue);
9393 }
94+EXPORT_SYMBOL(can_sock_destruct);
9495
9596 static const struct can_proto *can_get_proto(int protocol)
9697 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t