From: Oliver Neukum <oneukum@suse.de>
To: David Herrmann <dh.herrmann@googlemail.com>
Cc: linux-input@vger.kernel.org, jkosina@suse.cz
Subject: Re: [PATCH 04/16] HID: wiimote: Add extension support stub
Date: Mon, 14 Nov 2011 08:54:37 +0100 [thread overview]
Message-ID: <201111140854.37983.oneukum@suse.de> (raw)
In-Reply-To: <1321190839-3517-5-git-send-email-dh.herrmann@googlemail.com>
Am Sonntag, 13. November 2011, 14:27:07 schrieb David Herrmann:
> +/* Deinitializes the extension driver of a wiimote */
> +void wiiext_deinit(struct wiimote_data *wdata)
> +{
> + struct wiimote_ext *ext = wdata->ext;
> + unsigned long flags;
> +
> + if (!ext)
> + return;
> +
> + spin_lock_irqsave(&wdata->state.lock, flags);
> + wdata->ext = NULL;
> + spin_unlock_irqrestore(&wdata->state.lock, flags);
> +
> + cancel_work_sync(&ext->worker);
> + kfree(ext);
> +}
Are you sure you are doing this in the correct order?
You are needlessly leaving a window where wdate->ext is NULL
but the worker may run.
Regards
Oliver
next prev parent reply other threads:[~2011-11-14 8:31 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-13 13:27 [PATCH 00/16] Wiimote: Extension and Debug Support David Herrmann
2011-11-13 13:27 ` [PATCH 01/16] HID: wiimote: Rename driver to allow multiple source files David Herrmann
2011-11-13 13:27 ` [PATCH 02/16] HID: wiimote: Move common symbols into header David Herrmann
2011-11-13 13:27 ` [PATCH 03/16] HID: wiimote: Add read-mem helpers David Herrmann
2011-11-13 13:27 ` [PATCH 04/16] HID: wiimote: Add extension support stub David Herrmann
2011-11-14 7:54 ` Oliver Neukum [this message]
2011-11-14 11:26 ` David Herrmann
2011-11-14 11:35 ` Oliver Neukum
2011-11-15 19:24 ` David Herrmann
2011-11-13 13:27 ` [PATCH 05/16] HID: wiimote: Add extension initializer stubs David Herrmann
2011-11-13 13:27 ` [PATCH 06/16] HID: wiimote: Add extension initializers David Herrmann
2011-11-13 13:27 ` [PATCH 07/16] HID: wiimote: Add extension sysfs attribute David Herrmann
2011-11-13 13:27 ` [PATCH 08/16] HID: wiimote: Register input devices for extensions David Herrmann
2011-11-13 13:27 ` [PATCH 09/16] HID: wiimote: Add extension handler stubs David Herrmann
2011-11-13 13:27 ` [PATCH 10/16] HID: wiimote: Parse motion+ data David Herrmann
2011-11-13 13:27 ` [PATCH 11/16] HID: wiimote: Parse nunchuck data David Herrmann
2011-11-13 13:27 ` [PATCH 12/16] HID: wiimote: Parse classic controller data David Herrmann
2011-11-13 13:27 ` [PATCH 13/16] HID: wiimote: Add debugfs support stubs David Herrmann
2011-11-13 13:27 ` [PATCH 14/16] HID: wiimote: Allow direct eeprom access David Herrmann
2011-11-13 13:27 ` [PATCH 15/16] HID: wiimote: Allow direct DRM debug access David Herrmann
2011-11-13 13:27 ` [PATCH 16/16] HID: wiimote: Enable NO_INIT_REPORTS quirk David Herrmann
2011-11-16 17:05 ` Jiri Kosina
2011-11-16 17:49 ` David Herrmann
2011-11-16 18:39 ` Jiri Kosina
2011-11-17 13:11 ` David Herrmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111140854.37983.oneukum@suse.de \
--to=oneukum@suse.de \
--cc=dh.herrmann@googlemail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).