Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
48a7c3ab
Commit
48a7c3ab
authored
Oct 22, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hotplug: prevent skips in sequence number from happening
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
1c1355b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
lib/kobject_uevent.c
lib/kobject_uevent.c
+9
-8
No files found.
lib/kobject_uevent.c
View file @
48a7c3ab
...
...
@@ -255,13 +255,6 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
envp
[
i
++
]
=
scratch
;
scratch
+=
sprintf
(
scratch
,
"DEVPATH=%s"
,
kobj_path
)
+
1
;
spin_lock
(
&
sequence_lock
);
seq
=
++
hotplug_seqnum
;
spin_unlock
(
&
sequence_lock
);
envp
[
i
++
]
=
scratch
;
scratch
+=
sprintf
(
scratch
,
"SEQNUM=%lld"
,
(
long
long
)
seq
)
+
1
;
envp
[
i
++
]
=
scratch
;
scratch
+=
sprintf
(
scratch
,
"SUBSYSTEM=%s"
,
name
)
+
1
;
...
...
@@ -277,7 +270,15 @@ void kobject_hotplug(struct kobject *kobj, enum kobject_action action)
}
}
pr_debug
(
"%s: %s %s %s %s %s %s %s
\n
"
,
__FUNCTION__
,
argv
[
0
],
argv
[
1
],
spin_lock
(
&
sequence_lock
);
seq
=
++
hotplug_seqnum
;
spin_unlock
(
&
sequence_lock
);
envp
[
i
++
]
=
scratch
;
scratch
+=
sprintf
(
scratch
,
"SEQNUM=%lld"
,
(
long
long
)
seq
)
+
1
;
pr_debug
(
"%s: %s %s seq=%lld %s %s %s %s %s
\n
"
,
__FUNCTION__
,
argv
[
0
],
argv
[
1
],
(
long
long
)
seq
,
envp
[
0
],
envp
[
1
],
envp
[
2
],
envp
[
3
],
envp
[
4
]);
send_uevent
(
action_string
,
kobj_path
,
buffer
,
scratch
-
buffer
,
GFP_KERNEL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment