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: <20170113082500.GB3409@linux-x5ow.site>
Date:   Fri, 13 Jan 2017 09:25:00 +0100
From:   Johannes Thumshirn <jthumshirn@...e.de>
To:     Jens Axboe <axboe@...com>
Cc:     Bart Van Assche <Bart.VanAssche@...disk.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "osandov@...ndov.com" <osandov@...ndov.com>
Subject: Re: [PATCH 07/10] blk-mq: abstract out helpers for
 allocating/freeing tag maps

On Thu, Jan 12, 2017 at 02:54:38PM -0700, Jens Axboe wrote:
> On Thu, Jan 12 2017, Bart Van Assche wrote:
> > On Wed, 2017-01-11 at 14:40 -0700, Jens Axboe wrote:
> > > @@ -2392,12 +2425,12 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
> > >  	if (set->nr_hw_queues > nr_cpu_ids)
> > >  		set->nr_hw_queues = nr_cpu_ids;
> > >  
> > > +	ret = -ENOMEM;
> > >  	set->tags = kzalloc_node(nr_cpu_ids * sizeof(struct blk_mq_tags *),
> > >  				 GFP_KERNEL, set->numa_node);
> > >  	if (!set->tags)
> > >  		return -ENOMEM;
> > >  
> > > -	ret = -ENOMEM;
> > >  	set->mq_map = kzalloc_node(sizeof(*set->mq_map) * nr_cpu_ids,
> > >  			GFP_KERNEL, set->numa_node);
> > >  	if (!set->mq_map)
> > 
> > Not that it matters to me, but this change probably isn't needed?
> 
> Huh oops no, I'll move that back where it belongs.

Maybe even:

+ ret = -ENOMEM;
  set->tags = kzalloc_node(nr_cpu_ids * sizeof(struct blk_mq_tags *),
  			 GFP_KERNEL, set->numa_node);
  if (!set->tags)
-  	return -ENOMEM;
+	return ret;

- ret = -ENOMEM;

-- 
Johannes Thumshirn                                          Storage
jthumshirn@...e.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ