linux-stable/net/can
Oleksij Rempel 12aad02208 can: j1939: j1939_sk_init(): set SOCK_RCU_FREE to call sk_destruct() after RCU is done
commit 22c696fed2 upstream.

Set SOCK_RCU_FREE to let RCU to call sk_destruct() on completion.
Without this patch, we will run in to j1939_can_recv() after priv was
freed by j1939_sk_release()->j1939_sk_sock_destruct()

Fixes: 25fe97cb76 ("can: j1939: move j1939_priv_put() into sk_destruct callback")
Link: https://lore.kernel.org/r/20210617130623.12705-1-o.rempel@pengutronix.de
Cc: linux-stable <stable@vger.kernel.org>
Reported-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Reported-by: syzbot+bdf710cfc41c186fdff3@syzkaller.appspotmail.com
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-14 16:53:04 +02:00
..
j1939 can: j1939: j1939_sk_init(): set SOCK_RCU_FREE to call sk_destruct() after RCU is done 2021-07-14 16:53:04 +02:00
af_can.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +02:00
af_can.h can: introduce CAN midlayer private and allocate it automatically 2019-09-04 13:29:14 +02:00
bcm.c can: bcm: delay release of struct bcm_op after synchronize_rcu() 2021-07-14 16:53:04 +02:00
gw.c can: gw: synchronize rcu operations before removing gw job entry 2021-07-14 16:53:04 +02:00
Kconfig can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
Makefile can: add support of SAE J1939 protocol 2019-09-04 14:22:33 +02:00
proc.c net: introduce CAN specific pointer in the struct net_device 2021-04-07 14:47:41 +02:00
raw.c can: bcm/raw/isotp: use per module netdevice notifier 2021-06-23 14:41:28 +02:00