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]
Date:   Wed, 25 Mar 2020 17:54:27 +0100
From:   Hans Verkuil <hverkuil@...all.nl>
To:     Seungchul Kim <sc377.kim@...sung.com>, mchehab@...nel.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: v4l2-fh: define v4l2_fh struct regardless of
 condition

On 3/23/20 3:30 AM, Seungchul Kim wrote:
> v4l2_fh struct define differently by CONFIG_V4L2_MEM2MEM_DEV.
> If some vendors use CONFIG_V4L2_MEM2MEM_DEV by module, it can make the
> mismatch of v4l2_fh sturct.
> 
> By the mismatch, the following error occurs.
> ===============================
> [    7.533506] v4l2_mem2mem: disagrees about version of symbol video_devdata
> [    7.533594] v4l2_mem2mem: Unknown symbol video_devdata (err -22)
> [    7.535319] v4l2_mem2mem: disagrees about version of symbol
> v4l2_event_pending
> [    7.542532] v4l2_mem2mem: Unknown symbol v4l2_event_pending (err -22)
> ===============================
> 
> So v4l2_fh struct is modified to does not have dependency for
> CONFIG_V4L2_MEM2MEM_DEV.
> 
> Signed-off-by: Seungchul Kim <sc377.kim@...sung.com>
> ---
>  include/media/v4l2-fh.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h index
> 53b4dbb..b5b3e00 100644
> --- a/include/media/v4l2-fh.h
> +++ b/include/media/v4l2-fh.h
> @@ -53,9 +53,7 @@ struct v4l2_fh {
>  	unsigned int		navailable;
>  	u32			sequence;
>  
> -#if IS_ENABLED(CONFIG_V4L2_MEM2MEM_DEV)
>  	struct v4l2_m2m_ctx	*m2m_ctx;
> -#endif

This is a good change, but please also remove the same #if from v4l2_ioctl_get_lock()
in drivers/media/v4l2-core/v4l2-ioctl.c. That is now no longer needed there either
and without removing that those vendor drivers would be using the wrong lock.

Regards,

	Hans

>  };
>  
>  /**
> --
> 2.7.4
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ