Re: [PATCH] uevent: send events in correct order according to seqnum (v3)

Kay Sievers <[email protected]>
Newsgroups gmane.linux.hotplug.devel,gmane.linux.kernel
Message-ID <CAPXgP12kQm9dZdjh3Vch2ebrn21jW6r-=gVssmvU3WqJ6VE70g@mail.gmail.com>
On Wed, Mar 7, 2012 at 11:49, Andrew Vagin <[email protected]> wrote:
> The queue handling in the udev daemon assumes that the events are
> ordered.
>
> Before this patch uevent_seqnum is incremented under sequence_lock,
> than an event is send uner uevent_sock_mutex. I want to say that code
> contained a window between incrementing seqnum and sending an event.
>
> This patch locks uevent_sock_mutex before incrementing uevent_seqnum.
>
> v2: delete sequence_lock, uevent_seqnum is protected by uevent_sock_mutex
> v3: unlock the mutex before the goto exit
>
> Thanks for Kay for the comments.
>
> Signed-off-by: Andrew Vagin <[email protected]>

Looks good to me. Works fine in a kvm installation here.
Feel free to add:
  Tested-By: Kay Sievers <[email protected]>

Thanks lot for the udev debugging and taking care of it,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.