From: Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org>
Cc: Alan Stern
<stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>,
Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>,
Jiri Kosina <jkosina-AlSwsSmVLrQ@public.gmane.org>,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] HID: usbhid: fix dead lock between open and disconect
Date: Thu, 2 Feb 2012 12:05:43 +0800 [thread overview]
Message-ID: <CACVXFVPfZza5AWKnROs3fMzCzehw-d8aPc7ePZNqSGgpwzAc+Q@mail.gmail.com> (raw)
In-Reply-To: <CACVXFVP5V88_cTcpDYnsTy-M9aCaZ5Yneo=yVfB4+2_YjjWFFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Gentle ping on this fix, :-)
On Thu, Jan 12, 2012 at 6:33 PM, Ming Lei <tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hi,
>
> On Thu, Jan 12, 2012 at 5:54 PM, Oliver Neukum <oneukum-l3A5Bk7waGM@public.gmane.org> wrote:
>
>> you should however hold the lock while you unset hiddev->exist
>
> The patch doesn't change the rule.
>
>> and you should unset hiddev->exist before you call usb_deregister_dev().
>
> The lock is not hold before reading hiddev->exist and writing list->hiddev->open
> in hiddev_open, so I choose to put usb_deregister_dev before unsetting
> hiddev->exist in hiddev_disconnect to avoid possible race.
>
>
> thanks,
> --
> Ming Lei
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-02-02 4:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 9:42 [PATCH] HID: usbhid: fix dead lock between open and disconect Ming Lei
2012-01-12 9:54 ` Oliver Neukum
2012-01-12 10:33 ` Ming Lei
[not found] ` <CACVXFVP5V88_cTcpDYnsTy-M9aCaZ5Yneo=yVfB4+2_YjjWFFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-02 4:05 ` Ming Lei [this message]
[not found] ` <1326361342-4141-1-git-send-email-tom.leiming-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-02-02 8:50 ` Jiri Kosina
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=CACVXFVPfZza5AWKnROs3fMzCzehw-d8aPc7ePZNqSGgpwzAc+Q@mail.gmail.com \
--to=tom.leiming-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=gregkh-l3A5Bk7waGM@public.gmane.org \
--cc=jkosina-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=oneukum-l3A5Bk7waGM@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.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).