Commit 869016a
can: m_can: m_can_tx_handler(): fix use after free of skb
commit 2e8e79c upstream.
can_put_echo_skb() will clone skb then free the skb. Move the
can_put_echo_skb() for the m_can version 3.0.x directly before the
start of the xmit in hardware, similar to the 3.1.x branch.
Fixes: 8064673 ("can: m_can: update to support CAN FD features")
Link: https://lore.kernel.org/all/20220317081305.739554-1-mkl@pengutronix.de
Cc: stable@vger.kernel.org
Reported-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e90518d commit 869016a
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1491 | 1491 | | |
1492 | 1492 | | |
1493 | 1493 | | |
1494 | | - | |
1495 | | - | |
1496 | 1494 | | |
1497 | 1495 | | |
1498 | 1496 | | |
| |||
1509 | 1507 | | |
1510 | 1508 | | |
1511 | 1509 | | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
1512 | 1513 | | |
1513 | 1514 | | |
1514 | 1515 | | |
| |||
0 commit comments