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: <c9ba9026-8ff8-8717-60dc-92672724d5d8@suse.de>
Date:   Tue, 8 Nov 2016 15:59:16 +0100
From:   Hannes Reinecke <hare@...e.de>
To:     Christoph Hellwig <hch@....de>
Cc:     tglx@...utronix.de, axboe@...nel.dk, linux-block@...r.kernel.org,
        linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in
 irq_create_affinity_masks()

On 11/08/2016 03:55 PM, Christoph Hellwig wrote:
> [please trim the f***king context in your replies, thanks..]
>
> On Tue, Nov 08, 2016 at 09:15:27AM +0100, Hannes Reinecke wrote:
>>> +irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>>>  {
>>> -	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
>>> +	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
>>> +	int affv = nvecs - affd->pre_vectors - affd->post_vectors;
>>>  	nodemask_t nodemsk = NODE_MASK_NONE;
>>>  	struct cpumask *masks;
>>>  	cpumask_var_t nmsk;
>> Check for NULL affd?
>
> We expect all callers to pass a valid one.

Which you don't in this patch:

@@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev, 
void __iomem *base,
      int ret, i;

      if (affinity) {
-        masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
+        masks = irq_create_affinity_masks(nvec, NULL);
          if (!masks)
              pr_err("Unable to allocate affinity masks, ignoring\n");
      }

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ