From patchwork Wed Sep 3 14:37:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Kosina X-Patchwork-Id: 4834981 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E5A73C0338 for ; Wed, 3 Sep 2014 14:37:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 747A8201DD for ; Wed, 3 Sep 2014 14:37:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCE31201D3 for ; Wed, 3 Sep 2014 14:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932515AbaICOhI (ORCPT ); Wed, 3 Sep 2014 10:37:08 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36787 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932402AbaICOhH (ORCPT ); Wed, 3 Sep 2014 10:37:07 -0400 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3CE33ACC3; Wed, 3 Sep 2014 14:37:06 +0000 (UTC) Date: Wed, 3 Sep 2014 16:37:05 +0200 (CEST) From: Jiri Kosina To: Dylan Alex Simon cc: Benjamin Tissoires , linux-input@vger.kernel.org Subject: Re: hid-thingm: kernel panic on remove In-Reply-To: <20140903141601.GA1866@datura.dylex.net> Message-ID: References: <20140902174659.GA1811@datura.dylex.net> <54062150.2010800@gmail.com> <20140903023531.GA1128@datura.dylex.net> <20140903081723.GA1153@datura.dylex.net> <20140903130348.GA1161@datura.dylex.net> <20140903141601.GA1866@datura.dylex.net> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.6 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 On Wed, 3 Sep 2014, Dylan Alex Simon wrote: > I think that did the trick. I've run through the whole cycle about 20 times > in various conditions, and it seems solid so far. Thanks! Thanks. I actually think that the minimal necessary fix is below. Could you please do a (hopefully last) round of testing with just this patch applied? diff --git a/drivers/hid/hid-thingm.c b/drivers/hid/hid-thingm.c index 134be89..c1d21fa 100644 --- a/drivers/hid/hid-thingm.c +++ b/drivers/hid/hid-thingm.c @@ -208,10 +208,10 @@ unregister_red: static void thingm_remove_rgb(struct thingm_rgb *rgb) { - flush_work(&rgb->work); led_classdev_unregister(&rgb->red.ldev); led_classdev_unregister(&rgb->green.ldev); led_classdev_unregister(&rgb->blue.ldev); + flush_work(&rgb->work); } static int thingm_probe(struct hid_device *hdev, const struct hid_device_id *id)