Thread (17 messages) 17 messages, 4 authors, 2012-05-30

Re: [PATCH] drop_monitor: convert to modular building

From: Neil Horman <nhorman@tuxdriver.com>
Date: 2012-05-16 15:16:22

On Wed, May 16, 2012 at 04:48:01PM +0200, Eric Dumazet wrote:
On Wed, 2012-05-16 at 10:27 -0400, Neil Horman wrote:
quoted
When I first wrote drop monitor I wrote it to just build monolithically.  There
is no reason it can't be built modularly as well, so lets give it that
flexibiity.
quoted
+	for_each_present_cpu(cpu) {
+		data = &per_cpu(dm_cpu_data, cpu);
+		del_timer(&data->send_timer);
+		cancel_work_sync(&data->dm_alert_work);
+		/*
+		 * At this point, we should have exclusive access
+		 * to this struct and can free the skb inside it
+		 */
+		kfree_skb(data->skb);
+	}
+
I dont think for_each_present_cpu(cpu) is right 

(I realize drop_monitor already uses this, but its a bug)

To use it, you must have a notifier to react to cpu HOTPLUG events.

-> for_each_possible_cpu() is more correct.
Ok, i can do that.
Also, please dont add new printk(KERN_WARNING ...), use pr_warn(...)
instead
Ack, I'll add a patch to this series to convert the existing printks to their
corresponding pr_* macros
Neil
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help