From patchwork Wed Feb 10 10:49:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koen Zandberg X-Patchwork-Id: 8270131 Return-Path: X-Original-To: patchwork-linux-wpan@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C76B2BEEE5 for ; Wed, 10 Feb 2016 10:50:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB80820251 for ; Wed, 10 Feb 2016 10:50:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0863F20121 for ; Wed, 10 Feb 2016 10:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752688AbcBJKuI (ORCPT ); Wed, 10 Feb 2016 05:50:08 -0500 Received: from mx1.snt.utwente.nl ([130.89.149.33]:42958 "EHLO mx1.snt.utwente.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752667AbcBJKuH (ORCPT ); Wed, 10 Feb 2016 05:50:07 -0500 Received: from bergzand.student.utwente.nl ([130.89.160.191]) by mx1.snt.utwente.nl with esmtp (Exim 4.84) (envelope-from ) id 1aTSLT-0000hb-KJ for linux-wpan@vger.kernel.org; Wed, 10 Feb 2016 11:50:05 +0100 Received: from localhost (localhost [127.0.0.1]) by mail.bergzand.net (Postfix) with ESMTP id 17178594D7 for ; Wed, 10 Feb 2016 11:50:38 +0100 (CET) Received: from bergzand.student.utwente.nl ([127.0.0.1]) by localhost (mail.bergzand.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id O0C5wWIAChQj; Wed, 10 Feb 2016 11:50:37 +0100 (CET) Received: from bergzand.net (rainbowfactory.bergzand.net [IPv6:2001:67c:2564:ab03::2]) by bergzand.student.utwente.nl (Postfix) with ESMTP id 1227D594D5; Wed, 10 Feb 2016 11:50:37 +0100 (CET) From: Koen Zandberg To: linux-wpan@vger.kernel.org Cc: Koen Zandberg Subject: [PATCHv2 bluetooth-next] mac802154: Fixes kernel oops when unloading a radio driver Date: Wed, 10 Feb 2016 11:49:38 +0100 Message-Id: <1455101378-2225-1-git-send-email-koen@bergzand.net> X-Mailer: git-send-email 2.4.10 X-SNT-Signature: 8ab172221b4871d67fd17e022595b236875bbd15 X-SNT-Spam-Score: -0.2 X-SNT-Spam-Score-Bar: / X-SNT-Spam-Report: Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Destroying the workqueue before unregistering the net device caused a kernel oops Signed-off-by: Koen Zandberg Acked-by: Alexander Aring --- net/mac802154/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac802154/main.c b/net/mac802154/main.c index e8cab5b..87da85a 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c @@ -218,7 +218,6 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw) tasklet_kill(&local->tasklet); flush_workqueue(local->workqueue); - destroy_workqueue(local->workqueue); rtnl_lock(); @@ -226,6 +225,7 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw) rtnl_unlock(); + destroy_workqueue(local->workqueue); wpan_phy_unregister(local->phy); } EXPORT_SYMBOL(ieee802154_unregister_hw);