[PATCH 37/37] atl1c: cancel task when interface closed

From: xiong
Date: Thu Apr 12 2012 - 20:21:49 EST


common_task might be running while close routine is called,
wait/cancel it.

Signed-off-by: xiong <xiong@xxxxxxxxxxxxxxxx>
Tested-by: Liu David <dwliu@xxxxxxxxxxxxxxxx>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 4b9865b..55a7eed 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -2313,6 +2313,7 @@ static int atl1c_close(struct net_device *netdev)

WARN_ON(test_bit(__AT_RESETTING, &adapter->flags));
atl1c_down(adapter);
+ cancel_work_sync(&adapter->common_task);
atl1c_free_ring_resources(adapter);
return 0;
}
--
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/