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: <CAHp75VcuR+X5=-+VQ9HxU5Nh-uexzDbmZzX_JbZZ2B6tYXQmAQ@mail.gmail.com>
Date:   Fri, 16 Aug 2019 16:45:50 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Andy Shevchenko <andy@...radead.org>,
        Hans de Goede <hdegoede@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Darren Hart <dvhart@...radead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] usb: roles: intel_xhci: Supplying software node
 for the role mux

On Fri, Aug 16, 2019 at 1:45 PM Heikki Krogerus
<heikki.krogerus@...ux.intel.com> wrote:
>
> The primary purpose for this node will be to allow linking
> the users of the switch to it. The users will be for example
> USB Type-C connectors. By supplying a reference to this
> node in the software nodes representing the USB Type-C
> controllers or connectors, the drivers for those devices can
> access the switch.

> +       ret = software_node_register(&intel_xhci_usb_node);
> +       if (ret)
> +               return ret;
> +
> +       sw_desc.set = intel_xhci_usb_set_role,
> +       sw_desc.get = intel_xhci_usb_get_role,
> +       sw_desc.allow_userspace_control = true,
> +       sw_desc.fwnode = software_node_fwnode(&intel_xhci_usb_node);
> +
>         data->role_sw = usb_role_switch_register(dev, &sw_desc);
>         if (IS_ERR(data->role_sw))
>                 return PTR_ERR(data->role_sw);

Sounds to me like more fwnode_handle_put() calls are missed.

> @@ -164,6 +173,8 @@ static int intel_xhci_usb_remove(struct platform_device *pdev)
>         pm_runtime_disable(&pdev->dev);
>
>         usb_role_switch_unregister(data->role_sw);
> +       fwnode_handle_put(software_node_fwnode(&intel_xhci_usb_node));


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ