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
nexedi
linux
Commits
03985627
Commit
03985627
authored
May 28, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Do net_todo_list empty check under semaphore.
parent
37dedf02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
net/core/dev.c
net/core/dev.c
+9
-5
No files found.
net/core/dev.c
View file @
03985627
...
...
@@ -2979,15 +2979,18 @@ void netdev_run_todo(void)
struct
list_head
list
=
LIST_HEAD_INIT
(
list
);
int
err
;
/* Safe outside mutex since we only care about entries that
* this cpu put into queue while under RTNL.
*/
if
(
list_empty
(
&
net_todo_list
))
return
;
/* Need to guard against multiple cpu's getting out of order. */
down
(
&
net_todo_run_mutex
);
/* Not safe to do outside the semaphore. We must not return
* until all unregister events invoked by the local processor
* have been completed (either by this todo run, or one on
* another cpu).
*/
if
(
list_empty
(
&
net_todo_list
))
goto
out
;
/* Snapshot list, allow later requests */
spin_lock
(
&
net_todo_list_lock
);
list_splice_init
(
&
net_todo_list
,
&
list
);
...
...
@@ -3034,6 +3037,7 @@ void netdev_run_todo(void)
}
}
out:
up
(
&
net_todo_run_mutex
);
}
...
...
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