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-next>] [day] [month] [year] [list]
Message-ID: <20170628131534.1d549e19@canb.auug.org.au>
Date:   Wed, 28 Jun 2017 13:15:34 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Bjorn Helgaas <bhelgaas@...gle.com>
Cc:     Linux-Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Michael Hernandez <michael.hernandez@...ium.com>,
        Himanshu Madhani <himanshu.madhani@...ium.com>,
        Christoph Hellwig <hch@....de>
Subject: linux-next: manual merge of the tip tree with the pci tree

Hi all,

Today's linux-next merge of the tip tree got a conflict in:

  kernel/irq/affinity.c

between commit:

  6f9a22bc5775 ("PCI/MSI: Ignore affinity if pre/post vector count is more than min_vecs")

from the pci tree and commit:

  9a0ef98e186d ("genirq/affinity: Assign vectors to all present CPUs")

from the tip tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/irq/affinity.c
index 9b71406d2eec,d2747f9c5707..000000000000
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@@ -64,15 -108,8 +108,15 @@@ irq_create_affinity_masks(int nvecs, co
  	int last_affv = affv + affd->pre_vectors;
  	nodemask_t nodemsk = NODE_MASK_NONE;
  	struct cpumask *masks;
- 	cpumask_var_t nmsk;
+ 	cpumask_var_t nmsk, *node_to_present_cpumask;
  
 +	/*
 +	 * If there aren't any vectors left after applying the pre/post
 +	 * vectors don't bother with assigning affinity.
 +	 */
 +	if (!affv)
 +		return NULL;
 +
  	if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL))
  		return NULL;
  
@@@ -155,15 -199,10 +207,13 @@@ int irq_calc_affinity_vectors(int minve
  {
  	int resv = affd->pre_vectors + affd->post_vectors;
  	int vecs = maxvec - resv;
- 	int cpus;
+ 	int ret;
  
 +	if (resv > minvec)
 +		return 0;
 +
- 	/* Stabilize the cpumasks */
  	get_online_cpus();
- 	cpus = cpumask_weight(cpu_online_mask);
+ 	ret = min_t(int, cpumask_weight(cpu_present_mask), vecs) + resv;
  	put_online_cpus();
- 
- 	return min(cpus, vecs) + resv;
+ 	return ret;
  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ