mbox series

[for,v5.10,0/2] pulse8-cec: fix crash and support v12

Message ID 20201127122214.126701-1-hverkuil-cisco@xs4all.nl
Headers show
Series pulse8-cec: fix crash and support v12 | expand

Message

Hans Verkuil Nov. 27, 2020, 12:22 p.m. UTC
The first patch fixes a nasty bug where disconnecting a Pulse-Eight
would cause a duplicate free and crash.

In addition, it turns out that Pulse-Eight has a newer firmware version
(12, but the same issue is present for any firmware >= 10) where one
message was removed. This caused the probe() to fail, and then hit
exactly the same issue with a duplicate free. Both issues are fixed in
the first patch.

The second patch adds support for FW versions >= 10 by skipping the
removed message.

Thanks to Maxime Ripard for reporting this.

Regards,

	Hans

Hans Verkuil (2):
  pulse8-cec: fix duplicate free at disconnect or probe error
  pulse8-cec: add support for FW v10 and up

 drivers/media/cec/usb/pulse8/pulse8-cec.c | 52 +++++++++++++++--------
 1 file changed, 34 insertions(+), 18 deletions(-)

Comments

Maxime Ripard Nov. 27, 2020, 3:33 p.m. UTC | #1
Hi

On Fri, Nov 27, 2020 at 01:22:12PM +0100, Hans Verkuil wrote:
> The first patch fixes a nasty bug where disconnecting a Pulse-Eight
> would cause a duplicate free and crash.
> 
> In addition, it turns out that Pulse-Eight has a newer firmware version
> (12, but the same issue is present for any firmware >= 10) where one
> message was removed. This caused the probe() to fail, and then hit
> exactly the same issue with a duplicate free. Both issues are fixed in
> the first patch.
> 
> The second patch adds support for FW versions >= 10 by skipping the
> removed message.
> 
> Thanks to Maxime Ripard for reporting this.

I just built a 5.9.8 kernel with your patches on top, and I'm able to
start cec-ctl in monitor mode without issue. You can add for both patches:

Tested-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime