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: <4fd7d73f-d90f-4d0d-bd1c-75acb2ddae4f@nvidia.com>
Date: Wed, 23 Oct 2024 21:30:29 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J . Wysocki" <rafael@...nel.org>,
 Saravana Kannan <saravanak@...gle.com>
Cc: linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH] driver core: Don't try to create links if they are not
 needed


On 10/09/2024 14:00, Jon Hunter wrote:
> The following error messages are observed on boot with the Tegra234
> Jetson AGX Orin board ...
> 
>   tegra-xusb-padctl 3520000.padctl: Failed to create device link (0x180)
>     with 1-0008
>   tegra-xusb-padctl 3520000.padctl: Failed to create device link (0x180)
>     with 1-0008
>   tegra-xusb-padctl 3520000.padctl: Failed to create device link (0x180)
>     with 1-0008
> 
> In the above case, device_link_add() intentionally returns NULL because
> these are SYNC_STATE_ONLY links and the device is already probed.
> Therefore, the above messages are not actually errors. Fix this by
> replicating the test from device_link_add() in the function
> fw_devlink_create_devlink() and don't call device_link_add() if there
> are no links to create.
> 
> Signed-off-by: Jon Hunter <jonathanh@...dia.com>
> ---
> I am not sure if there is a better way to fix, but given that the
> function device_link_add() is exported, I figured we could not just
> move the test. Anyway, if there is a better way to fix this, let me
> know.
> 
>   drivers/base/core.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index b69b82da8837..5d6575e63e8b 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -2181,6 +2181,15 @@ static int fw_devlink_create_devlink(struct device *con,
>   			goto out;
>   		}
>   
> +		/*
> +		 * SYNC_STATE_ONLY links are useless once a consumer device has probed.
> +		 * So, only create it if the consumer hasn't probed yet.
> +		 */
> +		if (flags & DL_FLAG_SYNC_STATE_ONLY &&
> +		    con->links.status != DL_DEV_NO_DRIVER &&
> +		    con->links.status != DL_DEV_PROBING)
> +			goto out;
> +
>   		if (con != sup_dev && !device_link_add(con, sup_dev, flags)) {
>   			dev_err(con, "Failed to create device link (0x%x) with %s\n",
>   				flags, dev_name(sup_dev));


NACK. Turns out that there is an actual issue here and the proper fix is 
described here ...

https://lore.kernel.org/linux-tegra/CAGETcx-cgst26+2bRScx7mmJtOmrHzEfg0eVxzqHfQDTewy_yA@mail.gmail.com/T/#m5b77f8372671e5c4daec898f767370c302511949

Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ