From: Andrew Vagin Date: Wed, 7 Mar 2012 10:49:56 +0000 (+0400) Subject: uevent: send events in correct order according to seqnum (v3) X-Git-Tag: v3.4-rc1~187^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b60a18da393ed70db043a777fd9e6d5363077c4;p=pandora-kernel.git uevent: send events in correct order according to seqnum (v3) 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 Tested-By: Kay Sievers Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed