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]
Date:   Fri, 9 Jun 2023 00:53:55 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Leo Li <leoyang.li@....com>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>,
        "llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>
Subject: Re: [PATCH 4/6] bus: fsl-mc: fsl-mc-allocator: Improve error
 reporting

Hello,

On Thu, Jun 08, 2023 at 10:00:13PM +0000, Leo Li wrote:
> > Hmm, clang seems to be right, and I just confirmed that gcc (arm-linux-
> > gnueabihf-gcc (Debian 12.2.0-14) 12.2.0) doesn't emit a warning. :-\
> > 
> > My approach would be:
> > 
> > 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");
> > 
> > 
> > Should I prepare a proper patch, or is it possible to squash this change into
> > b3134039c5b3cf879841e3ec84c8cbf7675554ec?
> > 
> > @Li Yang: Please advice.
> 
> This looks fine.  Please send a new patch and I can squash it to the original commit.

I did send a proper patch already, see 

	https://lore.kernel.org/all/20230605112025.80061-1-u.kleine-koenig@pengutronix.de

You can apply that on top of the broken commit, or if you prefer also
squash it into the offending commit. Note that in the above thread there
is another fix for an older commit.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ