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
888fb5b9
Commit
888fb5b9
authored
Jan 28, 2003
by
James Bottomley
Committed by
James Bottomley
Jan 28, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCSI] Correct command leaks in the prep_fn
parent
54a7ee17
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_lib.c
+4
-5
No files found.
drivers/scsi/scsi_lib.c
View file @
888fb5b9
...
...
@@ -781,11 +781,8 @@ static int scsi_init_io(Scsi_Cmnd *SCpnt)
printk
(
KERN_ERR
"req nr_sec %lu, cur_nr_sec %u
\n
"
,
req
->
nr_sectors
,
req
->
current_nr_sectors
);
/*
* kill it. there should be no leftover blocks in this request
*/
SCpnt
=
scsi_end_request
(
SCpnt
,
0
,
req
->
nr_sectors
,
1
);
BUG_ON
(
SCpnt
);
/* release the command and kill it */
scsi_put_command
(
SCpnt
);
ret
=
BLKPREP_KILL
;
out:
return
ret
;
...
...
@@ -884,6 +881,7 @@ int scsi_prep_fn(struct request_queue *q, struct request *req)
* required).
*/
if
((
ret
=
scsi_init_io
(
SCpnt
)))
/* BLKPREP_KILL return also releases the command */
return
ret
;
/*
...
...
@@ -891,6 +889,7 @@ int scsi_prep_fn(struct request_queue *q, struct request *req)
*/
if
(
!
STpnt
->
init_command
(
SCpnt
))
{
scsi_release_buffers
(
SCpnt
);
scsi_put_command
(
SCpnt
);
return
BLKPREP_KILL
;
}
}
...
...
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