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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFoto2BLyxfko6VX8CZC99LBhJiM1POJOC_Sk=UxnrWcLQ@mail.gmail.com>
Date:	Fri, 29 Jan 2016 12:40:32 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Kishon Vijay Abraham I <kishon@...com>,
	Andreas Fenkart <afenkart@...il.com>,
	Tony Lindgren <tony@...mide.com>,
	Roger Quadros <rogerq@...com>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	linux-omap <linux-omap@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Peter Ujfalusi <peter.ujfalusi@...com>
Subject: Re: [PATCH v2] mmc: omap_hsmmc: don't print uninitialized variables

On 26 January 2016 at 16:26, Arnd Bergmann <arnd@...db.de> wrote:
> When DT based probing is used but the DMA request fails, the
> driver will print uninitialized stack data from the rx_req
> and tx_req variables, as indicated by this warning:
>
> drivers/mmc/host/omap_hsmmc.c: In function 'omap_hsmmc_probe':
> drivers/mmc/host/omap_hsmmc.c:2162:3: warning: 'rx_req' may be used uninitialized in this function [-Wmaybe-uninitialized]
>    dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
>
> This removes the DMA request line number from the warning, which
> is the easiest solution and won't hurt us any more as we are
> planning to remove the legacy code path anyway.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks, applied for next!

Kind regards
Uffe

> ---
> A simpler patch as v1 with the same result, as suggested by Peter Ujfalusi.
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index b6639ea0bf18..87f0d840a166 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2159,7 +2159,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
>                                                  &rx_req, &pdev->dev, "rx");
>
>         if (!host->rx_chan) {
> -               dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel %u\n", rx_req);
> +               dev_err(mmc_dev(host->mmc), "unable to obtain RX DMA engine channel\n");
>                 ret = -ENXIO;
>                 goto err_irq;
>         }
> @@ -2169,7 +2169,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
>                                                  &tx_req, &pdev->dev, "tx");
>
>         if (!host->tx_chan) {
> -               dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel %u\n", tx_req);
> +               dev_err(mmc_dev(host->mmc), "unable to obtain TX DMA engine channel\n");
>                 ret = -ENXIO;
>                 goto err_irq;
>         }
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ