linux/net/can/j1939
Davide Caratti 81807451c2 can: add drop reasons in CAN protocols receive path
sock_queue_rcv_skb() can fail because of lack of memory resources: use
drop reasons and pass the receiving socket to the tracepoint, so that
it's possible to better locate/debug such events.

Tested with:

| # modprobe vcan echo=1
| # ip link add name vcan2 type vcan
| # ip link set dev vcan2 up
| # ./netlayer/tst-proc 1 &
| # bg
| # while true ; do perf record -e skb:kfree_skb -aR  -- \
| > ./raw/tst-raw-sendto vcan2 ; perf script ; done
| [...]
| tst-raw-sendto 10942 [000] 506428.431856: skb:kfree_skb: skbaddr=0xffff97cec38b4200 rx_sk=0xffff97cf0f75a800 protocol=12 location=raw_rcv+0x20e reason: SOCKET_RCVBUF

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Link: https://patch.msgid.link/20250604160605.1005704-3-dcaratti@redhat.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2025-06-10 10:23:56 +02:00
..
address-claim.c can: j1939: do not wait 250 ms if the same addr was already claimed 2023-02-07 15:00:22 +01:00
bus.c can: Switch to use hrtimer_setup() 2025-02-18 10:35:45 +01:00
j1939-priv.h can: j1939: Fix UAF in j1939_sk_match_filter during setsockopt(SO_J1939_FILTER) 2024-02-14 13:53:03 +01:00
Kconfig
main.c net: can: j1939: Initialize unused data in j1939_send_one() 2024-06-21 10:50:15 +02:00
Makefile
socket.c can: add drop reasons in CAN protocols receive path 2025-06-10 10:23:56 +02:00
transport.c can: Switch to use hrtimer_setup() 2025-02-18 10:35:45 +01:00