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: <CAPDyKFpp3ODa+7z-Nx+ZLc2fqe6-=4MRQsQbKNVWb99u5-WasA@mail.gmail.com>
Date: Tue, 5 Mar 2024 13:14:34 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: cjb@...top.org, linux-arm-kernel@...ts.infradead.org, 
	linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] mmc: wmt-sdmmc: remove an incorrect release_mem_region()
 call in the .remove function

On Mon, 26 Feb 2024 at 22:37, Christophe JAILLET
<christophe.jaillet@...adoo.fr> wrote:
>
> This looks strange to call release_mem_region() in a remove function
> without any request_mem_region() in the probe or "struct resource"
> somewhere.
>
> So remove the corresponding code.
>
> Fixes: 3a96dff0f828 ("mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Applied for next, thanks!

> ---
> This patch is speculative. Review with care.
> Compile tested only.

It looks to me that $subject patch doesn't make things any worse.

Potentially we may want to call request|release_resource() (or
similar) during probe/remove, but as that isn't done during probe
today, I decided to pick this up as is.

Kind regards
Uffe


> ---
>  drivers/mmc/host/wmt-sdmmc.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
> index 77d5f1d24489..860380931b6c 100644
> --- a/drivers/mmc/host/wmt-sdmmc.c
> +++ b/drivers/mmc/host/wmt-sdmmc.c
> @@ -883,7 +883,6 @@ static void wmt_mci_remove(struct platform_device *pdev)
>  {
>         struct mmc_host *mmc;
>         struct wmt_mci_priv *priv;
> -       struct resource *res;
>         u32 reg_tmp;
>
>         mmc = platform_get_drvdata(pdev);
> @@ -911,9 +910,6 @@ static void wmt_mci_remove(struct platform_device *pdev)
>         clk_disable_unprepare(priv->clk_sdmmc);
>         clk_put(priv->clk_sdmmc);
>
> -       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       release_mem_region(res->start, resource_size(res));
> -
>         mmc_free_host(mmc);
>
>         dev_info(&pdev->dev, "WMT MCI device removed\n");
> --
> 2.43.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ