Skip to contentSkip to conversation

- Incorrect cpumask definition in net/core/flow.c

PATCH In review Jack Steiner 2 participants 2 messages Nov 7, 2003 – Nov 8, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 - Incorrect cpumask definition in net/core/flow.c

(I sent this to akpm earlier - I think I sent it to the wrong list)

This fixes a problem in net/core/flow.c.

The field "cpumap" is defined as a "unsigned long". It should be a "cpumask_t".

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1402 -> 1.1403
# net/core/flow.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/07 [email protected] 1.1403
# Change cpumap definition from "unsigned long" to "cpumask_t". # --------------------------------------------
#

net/core/flow.c +2 -2
diff -Nru a/net/core/flow.c b/net/core/flow.c
@@ -65,7 +65,7 @@
 
 struct flow_flush_info {
 	atomic_t cpuleft;
-	unsigned long cpumap;
+	cpumask_t cpumap;
 	struct completion completion;
 };
 static DEFINE_PER_CPU(struct tasklet_struct, flow_flush_tasklets) = { NULL };
@@ -73,7 +73,7 @@
 #define flow_flush_tasklet(cpu) (&per_cpu(flow_flush_tasklets, cpu))
 
 static DECLARE_MUTEX(flow_cache_cpu_sem);
-static unsigned long flow_cache_cpu_map;
+static cpumask_t flow_cache_cpu_map;
 static unsigned int flow_cache_cpu_count;
 
 static void flow_cache_new_hashrnd(unsigned long arg)
Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#1 lore raw
Quoted 2 lines · On Fri, 7 Nov 2003 16:37:29 -0600 Jack Steiner <[email protected]> wrote:

The field "cpumap" is defined as a "unsigned long". It should be a "cpumask_t".

You can't just do this, that's more broken than the original code.

You have to _ALSO_ change all of the accesses to these objects to use the cpumask interfaces.