[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2025021206-reliable-bucked-148c@gregkh>
Date: Wed, 12 Feb 2025 11:39:18 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Hervé Codina <herve.codina@...tlin.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: core: fix device leak in
__fw_devlink_relax_cycles()
On Wed, Feb 12, 2025 at 11:31:34AM +0100, Luca Ceresoli wrote:
> Commit bac3b10b78e5 ("driver core: fw_devlink: Stop trying to optimize
> cycle detection logic") introduced a new struct device *con_dev and a
> get_dev_from_fwnode() call to get it, but without adding a corresponding
> put_device().
>
> Link: https://lore.kernel.org/all/20241204124826.2e055091@booty/
> Fixes: bac3b10b78e5 ("driver core: fw_devlink: Stop trying to optimize cycle detection logic")
> Signed-off-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
> ---
> drivers/base/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index 5a1f051981149dc5b5eee4fb69c0ab748a85956d..2fde698430dff98b5e30f7be7d43d310289c4217 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -2079,6 +2079,7 @@ static bool __fw_devlink_relax_cycles(struct fwnode_handle *con_handle,
> out:
> sup_handle->flags &= ~FWNODE_FLAG_VISITED;
> put_device(sup_dev);
> + put_device(con_dev);
> put_device(par_dev);
> return ret;
> }
>
> ---
> base-commit: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
> change-id: 20250212-fix__fw_devlink_relax_cycles_missing_device_put-37cae5f4aac0
>
> Best regards,
> --
> Luca Ceresoli <luca.ceresoli@...tlin.com>
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an
older released kernel, yet you do not have a cc: stable line in the
signed-off-by area at all, which means that the patch will not be
applied to any older kernel releases. To properly fix this, please
follow the documented rules in the
Documentation/process/stable-kernel-rules.rst file for how to resolve
this.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Powered by blists - more mailing lists