[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3ebbe8cb-6041-4aac-a789-de04e612d2a8@kernel.org>
Date: Tue, 23 Dec 2025 21:15:34 +0100
From: Vincent Mailhol <mailhol@...nel.org>
To: Szymon Wilczek <swilczek.lx@...il.com>, mkl@...gutronix.de
Cc: linux-can@...r.kernel.org, linux-kernel@...r.kernel.org,
syzbot+e8cb6691a7cf68256cb8@...kaller.appspotmail.com
Subject: Re: [PATCH v2] can: etas_es58x: allow partial RX URB allocation to
succeed
On 23/12/2025 at 02:17, Szymon Wilczek wrote:
> When es58x_alloc_rx_urbs() fails to allocate the requested number of
> URBs but succeeds in allocating some, it returns an error code.
> This causes es58x_open() to return early, skipping the cleanup label
> 'free_urbs', which leads to the anchored URBs being leaked.
>
> As pointed out by maintainer Vincent Mailhol, the driver is designed
> to handle partial URB allocation gracefully. Therefore, partial
> allocation should not be treated as a fatal error.
>
> Modify es58x_alloc_rx_urbs() to return 0 if at least one URB has been
> allocated, restoring the intended behavior and preventing the leak
> in es58x_open().
>
> Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces")
> Reported-by: syzbot+e8cb6691a7cf68256cb8@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=e8cb6691a7cf68256cb8
> Signed-off-by: Szymon Wilczek <swilczek.lx@...il.com>
Thanks for the fix!
Reviewed-by: Vincent Mailhol <mailhol@...nel.org>
Yours sincerely,
Vincent Mailhol
Powered by blists - more mailing lists