From: norly Date: Sat, 18 Jun 2022 01:18:21 +0000 (+0200) Subject: Don't kfree_skb() after submitting the repurposed SKB X-Git-Url: https://git.enpas.org/?p=elmcan.git;a=commitdiff_plain;h=e1a93edd065ef8888d3043283628bb77a06d5c96 Don't kfree_skb() after submitting the repurposed SKB If can327 locks up your machine, but only in very specific situations, this is probably why. The memory leak fix went too far, and I missed the call to can327_feed_frame_to_netdev() before a return -ENODATA. Fixes: 37111be717212b8c7779978c0385393c2d51747d --- diff --git a/module/can327.c b/module/can327.c index 3572cfb..ae4d3c1 100644 --- a/module/can327.c +++ b/module/can327.c @@ -518,7 +518,6 @@ static int can327_parse_frame(struct can327 *elm, size_t len) * However, this will correctly drop the state machine back into * command mode. */ - kfree_skb(skb); return -ENODATA; }