{
struct net_bridge_port *p, *n;
+ send_sig(SIGKILL, dp->dp_task, 0);
kthread_stop(dp->dp_task);
/* Drop references to DP. */
{
struct datapath *dp = (struct datapath *) data;
- while (!kthread_should_stop()) {
+ allow_signal(SIGKILL);
+ while (!signal_pending(current)) {
#ifdef SUPPORT_SNAT
struct net_bridge_port *p;
chain_timeout(dp->chain);
msleep_interruptible(MAINT_SLEEP_MSECS);
}
-
+ while (!kthread_should_stop()) {
+ set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule();
+ }
return 0;
}
/*
* Distributed under the terms of the GNU GPL version 2.
- * Copyright (c) 2007, 2008 The Board of Trustees of The Leland
+ * Copyright (c) 2007, 2008, 2009 The Board of Trustees of The Leland
* Stanford Junior University
*/
unsigned int i;
int count = 0;
- mutex_lock(&dp_mutex);
+ if (mutex_lock_interruptible(&dp_mutex))
+ return 0;
for (i = 0; i <= th->bucket_mask; i++) {
struct sw_flow **bucket = &th->buckets[i];
struct sw_flow *flow = *bucket;
/*
* Distributed under the terms of the GNU GPL version 2.
- * Copyright (c) 2007, 2008 The Board of Trustees of The Leland
+ * Copyright (c) 2007, 2008, 2009 The Board of Trustees of The Leland
* Stanford Junior University
*/
struct sw_flow *flow;
int count = 0;
- mutex_lock(&dp_mutex);
+ if (mutex_lock_interruptible(&dp_mutex))
+ return 0;
list_for_each_entry (flow, &tl->flows, node) {
int reason = flow_timeout(flow);
if (reason >= 0) {