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] [day] [month] [year] [list]
Message-ID: <20171215091444.nbvqtbomc7henfnf@paasikivi.fi.intel.com>
Date:   Fri, 15 Dec 2017 11:14:44 +0200
From:   Sakari Ailus <sakari.ailus@...ux.intel.com>
To:     Tomasz Figa <tfiga@...omium.org>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>,
        Sebastian Reichel <sre@...nel.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Hans Verkuil <hans.verkuil@...co.com>
Subject: Re: [RFC PATCH] media: v4l2-device: Link subdevices to their parent
 devices if available

On Fri, Dec 15, 2017 at 01:32:21PM +0900, Tomasz Figa wrote:
> Currently v4l2_device_register_subdev_nodes() does not initialize the
> dev_parent field of the video_device structs it creates for subdevices
> being registered. This leads to __video_register_device() falling back
> to the parent device of associated v4l2_device struct, which often does
> not match the physical device the subdevice is registered for.
> 
> Due to the problem above, the links between real devices and v4l-subdev
> nodes cannot be obtained from sysfs, which might be confusing for the
> userspace trying to identify the hardware.
> 
> Fix this by initializing the dev_parent field of the video_device struct
> with the value of dev field of the v4l2_subdev struct. In case of
> subdevices without a parent struct device, the field will be NULL and the
> old behavior will be preserved by the semantics of
> __video_register_device().
> 
> Signed-off-by: Tomasz Figa <tfiga@...omium.org>

Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>

-- 
Sakari Ailus
sakari.ailus@...ux.intel.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ