1 Index: linux-2.6.25.4/lib/kobject_uevent.c
2 ===================================================================
3 --- linux-2.6.25.4.orig/lib/kobject_uevent.c
4 +++ linux-2.6.25.4/lib/kobject_uevent.c
5 @@ -27,7 +27,8 @@ u64 uevent_seqnum;
6 char uevent_helper[UEVENT_HELPER_PATH_LEN] = CONFIG_UEVENT_HELPER_PATH;
7 static DEFINE_SPINLOCK(sequence_lock);
8 #if defined(CONFIG_NET)
9 -static struct sock *uevent_sock;
10 +struct sock *uevent_sock = NULL;
11 +EXPORT_SYMBOL_GPL(uevent_sock);
14 /* the strings here must match the enum in include/linux/kobject.h */
15 @@ -40,6 +41,18 @@ static const char *kobject_actions[] = {
16 [KOBJ_OFFLINE] = "offline",
19 +u64 uevent_next_seqnum(void)
23 + spin_lock(&sequence_lock);
24 + seq = ++uevent_seqnum;
25 + spin_unlock(&sequence_lock);
29 +EXPORT_SYMBOL_GPL(uevent_next_seqnum);
32 * kobject_action_type - translate action string to numeric type
34 @@ -192,9 +205,7 @@ int kobject_uevent_env(struct kobject *k
35 kobj->state_remove_uevent_sent = 1;
37 /* we will send an event, so request a new sequence number */
38 - spin_lock(&sequence_lock);
39 - seq = ++uevent_seqnum;
40 - spin_unlock(&sequence_lock);
41 + seq = uevent_next_seqnum();
42 retval = add_uevent_var(env, "SEQNUM=%llu", (unsigned long long)seq);