From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752641AbaCWPJf (ORCPT ); Sun, 23 Mar 2014 11:09:35 -0400 Received: from www.linutronix.de ([62.245.132.108]:58100 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400AbaCWPJX (ORCPT ); Sun, 23 Mar 2014 11:09:23 -0400 Message-Id: <20140323150754.030657558@linutronix.de> User-Agent: quilt/0.60-1 Date: Sun, 23 Mar 2014 15:09:31 -0000 From: Thomas Gleixner To: LKML Cc: Julia Lawall , Andrew Morton , Marcel Holtmann , bt Subject: [patch 13/16] bt: hci-bcsp: Use del_timer_sync() in teardown path References: <20140323150557.288925975@linutronix.de> Content-Disposition: inline; filename=bt-hci-bcsp-use-del_timer_sync.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make sure no timer callback is running before freeing the datastructure which contains it. Signed-off-by: Thomas Gleixner Cc: Marcel Holtmann Cc: bt --- drivers/bluetooth/hci_bcsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: tip/drivers/bluetooth/hci_bcsp.c =================================================================== --- tip.orig/drivers/bluetooth/hci_bcsp.c +++ tip/drivers/bluetooth/hci_bcsp.c @@ -722,7 +722,7 @@ static int bcsp_close(struct hci_uart *h skb_queue_purge(&bcsp->unack); skb_queue_purge(&bcsp->rel); skb_queue_purge(&bcsp->unrel); - del_timer(&bcsp->tbcsp); + del_timer_sync(&bcsp->tbcsp); kfree(bcsp); return 0; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-Id: <20140323150754.030657558@linutronix.de> Date: Sun, 23 Mar 2014 15:09:31 -0000 From: Thomas Gleixner To: LKML Cc: Julia Lawall , Andrew Morton , Marcel Holtmann , bt Subject: [patch 13/16] bt: hci-bcsp: Use del_timer_sync() in teardown path References: <20140323150557.288925975@linutronix.de> List-ID: Make sure no timer callback is running before freeing the datastructure which contains it. Signed-off-by: Thomas Gleixner Cc: Marcel Holtmann Cc: bt --- drivers/bluetooth/hci_bcsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: tip/drivers/bluetooth/hci_bcsp.c =================================================================== --- tip.orig/drivers/bluetooth/hci_bcsp.c +++ tip/drivers/bluetooth/hci_bcsp.c @@ -722,7 +722,7 @@ static int bcsp_close(struct hci_uart *h skb_queue_purge(&bcsp->unack); skb_queue_purge(&bcsp->rel); skb_queue_purge(&bcsp->unrel); - del_timer(&bcsp->tbcsp); + del_timer_sync(&bcsp->tbcsp); kfree(bcsp); return 0;