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
61599636
Commit
61599636
authored
Nov 08, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bit find operations return past the end on failure.
parent
c0454a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
kernel/pid.c
kernel/pid.c
+1
-1
kernel/sched.c
kernel/sched.c
+1
-1
No files found.
kernel/pid.c
View file @
61599636
...
@@ -131,7 +131,7 @@ int alloc_pidmap(void)
...
@@ -131,7 +131,7 @@ int alloc_pidmap(void)
*/
*/
scan_more:
scan_more:
offset
=
find_next_zero_bit
(
map
->
page
,
BITS_PER_PAGE
,
offset
);
offset
=
find_next_zero_bit
(
map
->
page
,
BITS_PER_PAGE
,
offset
);
if
(
offset
=
=
BITS_PER_PAGE
)
if
(
offset
>
=
BITS_PER_PAGE
)
goto
next_map
;
goto
next_map
;
if
(
test_and_set_bit
(
offset
,
map
->
page
))
if
(
test_and_set_bit
(
offset
,
map
->
page
))
goto
scan_more
;
goto
scan_more
;
...
...
kernel/sched.c
View file @
61599636
...
@@ -770,7 +770,7 @@ static void load_balance(runqueue_t *this_rq, int idle)
...
@@ -770,7 +770,7 @@ static void load_balance(runqueue_t *this_rq, int idle)
idx
=
sched_find_first_bit
(
array
->
bitmap
);
idx
=
sched_find_first_bit
(
array
->
bitmap
);
else
else
idx
=
find_next_bit
(
array
->
bitmap
,
MAX_PRIO
,
idx
);
idx
=
find_next_bit
(
array
->
bitmap
,
MAX_PRIO
,
idx
);
if
(
idx
=
=
MAX_PRIO
)
{
if
(
idx
>
=
MAX_PRIO
)
{
if
(
array
==
busiest
->
expired
)
{
if
(
array
==
busiest
->
expired
)
{
array
=
busiest
->
active
;
array
=
busiest
->
active
;
goto
new_array
;
goto
new_array
;
...
...
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