media: mc: Fix graph walk in media_pipeline_start
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Mon, 18 Mar 2024 09:50:59 +0000 (11:50 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 10 Apr 2024 13:15:31 +0000 (15:15 +0200)
commit8a9d420149c477e7c97fbd6453704e4612bdd3fa
treecaeacf1212ea647eefa977209b356275e743ac6b
parent34793224b6dfd59cb17e8f77b81711f437c32f48
media: mc: Fix graph walk in media_pipeline_start

The graph walk tries to follow all links, even if they are not between
pads. This causes a crash with, e.g. a MEDIA_LNK_FL_ANCILLARY_LINK link.

Fix this by allowing the walk to proceed only for MEDIA_LNK_FL_DATA_LINK
links.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: stable@vger.kernel.org # for 6.1 and later
Fixes: ae219872834a ("media: mc: entity: Rewrite media_pipeline_start()")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/mc/mc-entity.c