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]
Date:   Thu, 29 Nov 2018 16:01:06 +0000
From:   Will Deacon <will.deacon@....com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     Nicholas Mc Guire <hofrat@...dl.org>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf: arm_spe: handle devm_kasprintf() failure

On Thu, Nov 29, 2018 at 12:14:32PM +0000, Mark Rutland wrote:
> On Wed, Nov 28, 2018 at 12:24:47PM +0100, Nicholas Mc Guire wrote:
> > diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
> > index 54ec278..f1ea00c 100644
> > --- a/drivers/perf/arm_spe_pmu.c
> > +++ b/drivers/perf/arm_spe_pmu.c
> > @@ -927,6 +927,11 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu)
> >  
> >  	idx = atomic_inc_return(&pmu_idx);
> >  	name = devm_kasprintf(dev, GFP_KERNEL, "%s_%d", PMUNAME, idx);
> > +	if (!name) {
> > +		dev_err(dev, "Allocation of name failed\n");
> > +		return -ENOMEM;
> > +	}
> 
> In the other dev_err() messages, we use the form "failed to ...", e.g.
> 
> 	"failed to get IRQ (%d)\n"
> 	"failed to get PPI partition (%d)\n
> 	"failed to allocate spe_pmu\n"
> 
> ... so for consistency could you please change the string to:
> 
> 	"failed to allocate spe_pmu name\n"
> 
> With that, feel free to add:
> 
> Acked-by: Mark Rutland <mark.rutland@....com>

Thanks, I've queued this for 4.21 with a tweaked error message.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ