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: <20210818192816.GB28932@amd>
Date:   Wed, 18 Aug 2021 21:28:16 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Saeed Mahameed <saeedm@...dia.com>
Cc:     "pavel@...x.de" <pavel@...x.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        Moshe Shemesh <moshe@...dia.com>,
        Tariq Toukan <tariqt@...dia.com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "sashal@...nel.org" <sashal@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Aya Levin <ayal@...dia.com>
Subject: Re: [PATCH 5.10 49/96] net/mlx5: Fix return value from tracer
 initialization

Hi!

> > Could someone familiar with the code verify it after me?

> > Signed-off-by: Pavel Machek (CIP) <pavel@...x.de>
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> > index 3dfcb20e97c6..857be86b4a11 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c
> > @@ -1007,7 +1007,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer
> > *tracer)
> >         err = mlx5_core_alloc_pd(dev, &tracer->buff.pdn);
> >         if (err) {
> >                 mlx5_core_warn(dev, "FWTracer: Failed to allocate PD
> > %d\n", err);
> > -               return err;
> > +               goto err_cancel_work;
> >         }
> >  
> >         err = mlx5_fw_tracer_create_mkey(tracer);
> > @@ -1031,6 +1031,7 @@ int mlx5_fw_tracer_init(struct mlx5_fw_tracer
> > *tracer)
> >         mlx5_core_destroy_mkey(dev, &tracer->buff.mkey);
> >  err_dealloc_pd:
> >         mlx5_core_dealloc_pd(dev, tracer->buff.pdn);
> > +err_cancel_work:
> >         cancel_work_sync(&tracer->read_fw_strings_work);
> >         return err;
> 
> this is correct, do you want to submit this patch or do you want us to
> handle ?
> maybe it is better if we delayed queue_work() to after all the fragile
> code behind it, to reduce the error path handling .. 

I'd prefer you to handle it.

Thank you,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ