Thread (16 messages) 16 messages, 4 authors, 2021-07-27

Re: [PATCH] net: can: add missing urb->transfer_dma initialization

From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2021-07-25 16:30:47
Also in: lkml, netdev

On 25.07.2021 22:27:37, Yasushi SHOJI wrote:
Hi Pavel,

I've tested this patch on top of v5.14-rc2.  All good.

Tested-by: Yasushi SHOJI <yashi@spacecubics.com>

Some nitpicks.

On Sun, Jul 25, 2021 at 7:36 PM Pavel Skripkin [off-list ref] wrote:
quoted
Yasushi reported, that his Microchip CAN Analyzer stopped working since
commit 91c02557174b ("can: mcba_usb: fix memory leak in mcba_usb").
The problem was in missing urb->transfer_dma initialization.

In my previous patch to this driver I refactored mcba_usb_start() code to
avoid leaking usb coherent buffers. To achive it, I passed local stack
achieve
quoted
variable to usb_alloc_coherent() and then saved it to private array to
correctly free all coherent buffers on ->close() call. But I forgot to
inialize urb->transfer_dma with variable passed to usb_alloc_coherent().
initialize
Fixed while applying.

Thanks,
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 |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help