From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oliver Neukum Subject: Re: [PATCH v2] HID: appleir: add support for Apple ir devices Date: Wed, 17 Apr 2013 12:30:52 +0200 Message-ID: <1614985.S6T7jXBLvD@linux-5eaq.site> References: <1366189389-6572-1-git-send-email-benjamin.tissoires@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Return-path: Received: from cantor2.suse.de ([195.135.220.15]:48317 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965826Ab3DQKaD (ORCPT ); Wed, 17 Apr 2013 06:30:03 -0400 In-Reply-To: <1366189389-6572-1-git-send-email-benjamin.tissoires@redhat.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Benjamin Tissoires Cc: Jiri Kosina , Dmitry Torokhov , Benjamin Tissoires , Bastien Nocera , Fabien , Jarod Wilson , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org On Wednesday 17 April 2013 11:03:09 Benjamin Tissoires wrote: > +static void appleir_remove(struct hid_device *hid) > +{ > + struct appleir *appleir = hid_get_drvdata(hid); > + del_timer_sync(&appleir->key_up_timer); > + hid_hw_stop(hid); > + kfree(appleir); > +} Hi, this looks like a race condition. If you get input between del_timer_sync() and hid_hw_stop() the timer may be restarted. You need to stop the hw first. Regards Oliver