[patch 14/16] bt: hci-h5: Use del_timer_sync() in exit path

From: Thomas Gleixner
Date: Sun Mar 23 2014 - 11:11:21 EST


Make sure no timer callback is running before releasing the
datastructure which contains it.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Marcel Holtmann <marcel@xxxxxxxxxxxx>
Cc: bt <linux-bluetooth@xxxxxxxxxxxxxxx>
---
drivers/bluetooth/hci_h5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: tip/drivers/bluetooth/hci_h5.c
===================================================================
--- tip.orig/drivers/bluetooth/hci_h5.c
+++ tip/drivers/bluetooth/hci_h5.c
@@ -210,7 +210,7 @@ static int h5_close(struct hci_uart *hu)
skb_queue_purge(&h5->rel);
skb_queue_purge(&h5->unrel);

- del_timer(&h5->timer);
+ del_timer_sync(&h5->timer);

kfree(h5);



--
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/