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: <20230605153915.GB2480995@dev-arch.thelio-3990X>
Date:   Mon, 5 Jun 2023 08:39:15 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, Li Yang <leoyang.li@....com>,
        Ioana Ciornei <ioana.ciornei@....com>,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        kernel@...gutronix.de, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH 1/2] bus: fsl-mc: fsl-mc-allocator: Initialize mc_bus_dev
 before use

On Mon, Jun 05, 2023 at 01:20:24PM +0200, Uwe Kleine-König wrote:
> Fixes a clang compiler warning:
> 
> >> drivers/bus/fsl-mc/fsl-mc-allocator.c:108:12: warning: variable 'mc_bus_dev' is uninitialized when used here [-Wuninitialized]
>                    dev_err(&mc_bus_dev->dev, "resource mismatch\n");
> 
> Fixes: b3134039c5b3 ("bus: fsl-mc: fsl-mc-allocator: Improve error reporting")
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202306021936.OktTcMAT-lkp@intel.com/
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>

Reviewed-by: Nathan Chancellor <nathan@...nel.org>

> ---
>  drivers/bus/fsl-mc/fsl-mc-allocator.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/bus/fsl-mc/fsl-mc-allocator.c b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> index 0ad68099684e..991273f956ce 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-allocator.c
> +++ b/drivers/bus/fsl-mc/fsl-mc-allocator.c
> @@ -103,14 +103,15 @@ static int __must_check fsl_mc_resource_pool_remove_device(struct fsl_mc_device
>  	struct fsl_mc_resource *resource;
>  	int error = -EINVAL;
>  
> +	mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
> +	mc_bus = to_fsl_mc_bus(mc_bus_dev);
> +
>  	resource = mc_dev->resource;
>  	if (!resource || resource->data != mc_dev) {
>  		dev_err(&mc_bus_dev->dev, "resource mismatch\n");
>  		goto out;
>  	}
>  
> -	mc_bus_dev = to_fsl_mc_device(mc_dev->dev.parent);
> -	mc_bus = to_fsl_mc_bus(mc_bus_dev);
>  	res_pool = resource->parent_pool;
>  	if (res_pool != &mc_bus->resource_pools[resource->type]) {
>  		dev_err(&mc_bus_dev->dev, "pool mismatch\n");
> 
> base-commit: 59272ad8d9e8ea6398a96f8c6d62da284bf2ae6e
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ