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
ffd23335
Commit
ffd23335
authored
Feb 14, 2003
by
Jens Axboe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] missing lock in get_request_wait()
We must grab lock before checking rl->count.
parent
409499e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
drivers/block/ll_rw_blk.c
drivers/block/ll_rw_blk.c
+8
-0
No files found.
drivers/block/ll_rw_blk.c
View file @
ffd23335
...
@@ -1358,11 +1358,19 @@ static struct request *get_request_wait(request_queue_t *q, int rw)
...
@@ -1358,11 +1358,19 @@ static struct request *get_request_wait(request_queue_t *q, int rw)
generic_unplug_device
(
q
);
generic_unplug_device
(
q
);
do
{
do
{
int
block
=
0
;
prepare_to_wait_exclusive
(
&
rl
->
wait
,
&
wait
,
prepare_to_wait_exclusive
(
&
rl
->
wait
,
&
wait
,
TASK_UNINTERRUPTIBLE
);
TASK_UNINTERRUPTIBLE
);
spin_lock_irq
(
q
->
queue_lock
);
if
(
!
rl
->
count
)
if
(
!
rl
->
count
)
block
=
1
;
spin_unlock_irq
(
q
->
queue_lock
);
if
(
block
)
io_schedule
();
io_schedule
();
finish_wait
(
&
rl
->
wait
,
&
wait
);
finish_wait
(
&
rl
->
wait
,
&
wait
);
spin_lock_irq
(
q
->
queue_lock
);
spin_lock_irq
(
q
->
queue_lock
);
rq
=
get_request
(
q
,
rw
);
rq
=
get_request
(
q
,
rw
);
spin_unlock_irq
(
q
->
queue_lock
);
spin_unlock_irq
(
q
->
queue_lock
);
...
...
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