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: <CAJMQK-hzjtZrXC+sdcs39kF6nvUzkNcgNXFXPzTUQHzr8f6ZkA@mail.gmail.com>
Date:   Tue, 8 Feb 2022 16:06:59 +0800
From:   Hsin-Yi Wang <hsinyi@...omium.org>
To:     Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc:     dri-devel@...ts.freedesktop.org, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, amd-gfx@...ts.freedesktop.org,
        intel-gfx@...ts.freedesktop.org,
        Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        devicetree@...r.kernel.org, Simon Ser <contact@...rsion.fr>,
        linux-kernel@...r.kernel.org, Maxime Ripard <mripard@...nel.org>,
        Alex Deucher <alexander.deucher@....com>,
        Rob Herring <robh+dt@...nel.org>,
        linux-mediatek@...ts.infradead.org,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Harry Wentland <harry.wentland@....com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [Intel-gfx] [PATCH v7 1/3] gpu: drm: separate panel orientation
 property creating and value setting

On Tue, Feb 8, 2022 at 3:52 PM Ville Syrjälä
<ville.syrjala@...ux.intel.com> wrote:
>
> On Tue, Feb 08, 2022 at 03:37:12PM +0800, Hsin-Yi Wang wrote:
> > +int drm_connector_init_panel_orientation_property(
> > +     struct drm_connector *connector)
> > +{
> > +     struct drm_device *dev = connector->dev;
> > +     struct drm_property *prop;
> > +
> > +     prop = drm_property_create_enum(dev, DRM_MODE_PROP_IMMUTABLE,
> > +                     "panel orientation",
> > +                     drm_panel_orientation_enum_list,
> > +                     ARRAY_SIZE(drm_panel_orientation_enum_list));
> > +     if (!prop)
> > +             return -ENOMEM;
> > +
> > +     dev->mode_config.panel_orientation_property = prop;
>
> Leak when called multiple times. I guess you could just put
> this into drm_connector_create_standard_properties() instead
> and avoid that issue entirely.
>
I'll add a check for dev->mode_config.panel_orientation_property to
avoid the leak issue if called multiple times.
If we add in drm_connector_create_standard_properties(), we still need
another function to attach the property earlier for bridge/connectors
that require this property, since not all bridge/connectors need this
property.

> --
> Ville Syrjälä
> Intel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ