There is no need to call dev_kfree_skb when usb_submit_urb fails beacause
can_put_echo_skb deletes original skb and can_free_echo_skb deletes the cloned
skb.
Signed-off-by: Hangyu Hua <redacted>
---
drivers/net/can/usb/ems_usb.c | 1 -
1 file changed, 1 deletion(-)
From: Marc Kleine-Budde <mkl@pengutronix.de> Date: 2022-02-28 10:06:31
On 28.02.2022 16:36:39, Hangyu Hua wrote:
There is no need to call dev_kfree_skb when usb_submit_urb fails beacause
can_put_echo_skb deletes original skb and can_free_echo_skb deletes the cloned
skb.
Signed-off-by: Hangyu Hua <redacted>
Thanks for the patch. Please add a Fixes tag, that points to the commit
that introduced the problem, here it's:
Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface")
I've adjusted the subject a bit ("can: usb: ems_usb_start_xmit(): fix
double dev_kfree_skb() in error path") and added stable on Cc.
Added patch to can/testing.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
I get it. I'll remake a patch that matches your suggestions.
Thanks.
On 2022/2/28 16:55, Marc Kleine-Budde wrote:
On 28.02.2022 16:36:39, Hangyu Hua wrote:
quoted
There is no need to call dev_kfree_skb when usb_submit_urb fails beacause
can_put_echo_skb deletes original skb and can_free_echo_skb deletes the cloned
skb.
Signed-off-by: Hangyu Hua <redacted>
Thanks for the patch. Please add a Fixes tag, that points to the commit
that introduced the problem, here it's:
Fixes: 702171adeed3 ("ems_usb: Added support for EMS CPC-USB/ARM7 CAN/USB interface")
I've adjusted the subject a bit ("can: usb: ems_usb_start_xmit(): fix
double dev_kfree_skb() in error path") and added stable on Cc.
Added patch to can/testing.
regards,
Marc