lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241123213952.GD19573@pendragon.ideasonboard.com>
Date: Sat, 23 Nov 2024 23:39:52 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Cosmin Tanislav <demonsingur@...il.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	Hans Verkuil <hverkuil@...all.nl>,
	Steve Longerbeam <slongerbeam@...il.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] v4l2: mc: fix endpoint iteration

Hi Cosmin,

Thank you for the patch.

On Fri, Nov 22, 2024 at 04:55:24PM +0200, Cosmin Tanislav wrote:
> When creating links from a subdev to a sink, the current logic tries to
> iterate over the endpoints of dev's fwnode.
> 
> This might not be correct when the subdev uses a different fwnode
> compared to the dev's fwnode.
> 
> If, when registering, the subdev's fwnode is not set, the code inside
> v4l2_async_register_subdev will set it to the dev's fwnode.
> 
> To fix this, just use the subdev's fwnode.
> 
> Signed-off-by: Cosmin Tanislav <demonsingur@...il.com>
> Fixes: 0d3c81e82da9 ("media: v4l2-mc: add v4l2_create_fwnode_links helpers")

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>

> ---
>  drivers/media/v4l2-core/v4l2-mc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-mc.c b/drivers/media/v4l2-core/v4l2-mc.c
> index 4bb91359e3a9a..937d358697e19 100644
> --- a/drivers/media/v4l2-core/v4l2-mc.c
> +++ b/drivers/media/v4l2-core/v4l2-mc.c
> @@ -329,7 +329,7 @@ int v4l2_create_fwnode_links_to_pad(struct v4l2_subdev *src_sd,
>  	if (!(sink->flags & MEDIA_PAD_FL_SINK))
>  		return -EINVAL;
>  
> -	fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) {
> +	fwnode_graph_for_each_endpoint(src_sd->fwnode, endpoint) {
>  		struct fwnode_handle *remote_ep;
>  		int src_idx, sink_idx, ret;
>  		struct media_pad *src;

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ