Andrew Vagin 8247c5b750 uevent: send events in correct order according to seqnum (v3)
commit 7b60a18da393ed70db043a777fd9e6d5363077c4 upstream.

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 <avagin@openvz.org>
Tested-By: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-02 10:31:52 -07:00
..
2011-09-21 13:39:59 -07:00
2005-10-18 08:26:15 -07:00
2011-07-26 16:49:47 -07:00
2008-07-24 10:47:33 -07:00
2011-03-11 14:25:50 +00:00
2008-06-06 11:29:10 -07:00
2007-07-16 09:05:50 -07:00
2011-10-29 21:20:22 +02:00
2007-07-17 10:23:04 -07:00
2006-06-25 10:01:20 -07:00
2012-01-10 16:30:51 -08:00
2006-06-25 10:01:20 -07:00
2007-05-10 18:24:13 +02:00
2011-07-26 16:49:47 -07:00
2011-03-31 11:26:23 -03:00
2012-01-03 22:54:56 -05:00
2009-06-18 13:04:05 -07:00
2010-05-25 08:07:06 -07:00
2011-09-20 23:24:44 -04:00
2010-04-06 15:52:11 -07:00
2011-11-02 16:07:00 -07:00
2006-06-20 20:24:58 -07:00
2011-11-28 21:12:42 +02:00
2010-08-09 20:45:05 -07:00
2006-10-06 08:53:40 -07:00
2012-02-07 14:32:24 -08:00
2011-07-25 20:57:15 -07:00
2011-08-06 18:32:45 -07:00
2011-11-04 17:47:34 -04:00
2011-03-31 11:26:23 -03:00
2012-01-31 23:19:47 +02:00
2010-06-16 18:08:13 +02:00
2010-01-11 09:34:05 -08:00
2011-12-08 19:52:43 -05:00
2008-07-26 12:00:10 -07:00
2011-03-31 11:26:23 -03:00
2010-05-19 22:40:47 -04:00