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
990e08a3
Commit
990e08a3
authored
May 29, 2004
by
Alexander Viro
Committed by
Linus Torvalds
May 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] sparse: sg.c annotation
rest of pointers in sg ioctl arguments made __user.
parent
c8293669
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
61 deletions
+58
-61
drivers/block/scsi_ioctl.c
drivers/block/scsi_ioctl.c
+1
-1
drivers/scsi/sg.c
drivers/scsi/sg.c
+52
-55
include/scsi/sg.h
include/scsi/sg.h
+5
-5
No files found.
drivers/block/scsi_ioctl.c
View file @
990e08a3
...
...
@@ -400,7 +400,7 @@ int scsi_cmd_ioctl(struct gendisk *bd_disk, unsigned int cmd, void __user *arg)
break
;
hdr
.
dxferp
=
cgc
.
buffer
;
hdr
.
sbp
=
(
char
*
)
cgc
.
sense
;
hdr
.
sbp
=
cgc
.
sense
;
if
(
hdr
.
sbp
)
hdr
.
mx_sb_len
=
sizeof
(
struct
request_sense
);
hdr
.
timeout
=
cgc
.
timeout
;
...
...
drivers/scsi/sg.c
View file @
990e08a3
This diff is collapsed.
Click to expand it.
include/scsi/sg.h
View file @
990e08a3
...
...
@@ -91,7 +91,7 @@ Major new features in SG 3.x driver (cf SG 2.x drivers)
typedef
struct
sg_iovec
/* same structure as used by readv() Linux system */
{
/* call. It defines one scatter-gather element. */
void
*
iov_base
;
/* Starting address */
void
__user
*
iov_base
;
/* Starting address */
size_t
iov_len
;
/* Length in bytes */
}
sg_iovec_t
;
...
...
@@ -104,14 +104,14 @@ typedef struct sg_io_hdr
unsigned
char
mx_sb_len
;
/* [i] max length to write to sbp */
unsigned
short
iovec_count
;
/* [i] 0 implies no scatter gather */
unsigned
int
dxfer_len
;
/* [i] byte count of data transfer */
void
*
dxferp
;
/* [i], [*io] points to data transfer memory
void
__user
*
dxferp
;
/* [i], [*io] points to data transfer memory
or scatter gather list */
unsigned
char
__user
*
cmdp
;
/* [i], [*i] points to command to perform */
unsigned
char
*
sbp
;
/* [i], [*o] points to sense_buffer memory */
void
__user
*
sbp
;
/* [i], [*o] points to sense_buffer memory */
unsigned
int
timeout
;
/* [i] MAX_UINT->no timeout (unit: millisec) */
unsigned
int
flags
;
/* [i] 0 -> default, see SG_FLAG... */
int
pack_id
;
/* [i->o] unused internally (normally) */
void
*
usr_ptr
;
/* [i->o] unused internally */
void
__user
*
usr_ptr
;
/* [i->o] unused internally */
unsigned
char
status
;
/* [o] scsi status */
unsigned
char
masked_status
;
/* [o] shifted, masked scsi status */
unsigned
char
msg_status
;
/* [o] messaging level data (optional) */
...
...
@@ -171,7 +171,7 @@ typedef struct sg_req_info { /* used by SG_GET_REQUEST_TABLE ioctl() */
char
sg_io_owned
;
/* 0 -> complete with read(), 1 -> owned by SG_IO */
char
problem
;
/* 0 -> no problem detected, 1 -> error to report */
int
pack_id
;
/* pack_id associated with request */
void
*
usr_ptr
;
/* user provided pointer (in new interface) */
void
__user
*
usr_ptr
;
/* user provided pointer (in new interface) */
unsigned
int
duration
;
/* millisecs elapsed since written (req_state==1)
or request duration (req_state==2) */
int
unused
;
...
...
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