Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

From: Christoph Hellwig
Date: Tue Nov 08 2016 - 09:55:23 EST


[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.