Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
be6f19fc
Commit
be6f19fc
authored
Mar 05, 2009
by
Pierre Ossman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sdio: check that addresses are within the address space
Signed-off-by:
Pierre Ossman
<
drzeus@drzeus.cx
>
parent
c8d718f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
drivers/mmc/core/sdio_ops.c
drivers/mmc/core/sdio_ops.c
+8
-0
No files found.
drivers/mmc/core/sdio_ops.c
View file @
be6f19fc
...
...
@@ -76,6 +76,10 @@ int mmc_io_rw_direct(struct mmc_card *card, int write, unsigned fn,
BUG_ON
(
!
card
);
BUG_ON
(
fn
>
7
);
/* sanity check */
if
(
addr
&
~
0x1FFFF
)
return
-
EINVAL
;
memset
(
&
cmd
,
0
,
sizeof
(
struct
mmc_command
));
cmd
.
opcode
=
SD_IO_RW_DIRECT
;
...
...
@@ -125,6 +129,10 @@ int mmc_io_rw_extended(struct mmc_card *card, int write, unsigned fn,
WARN_ON
(
blocks
==
0
);
WARN_ON
(
blksz
==
0
);
/* sanity check */
if
(
addr
&
~
0x1FFFF
)
return
-
EINVAL
;
memset
(
&
mrq
,
0
,
sizeof
(
struct
mmc_request
));
memset
(
&
cmd
,
0
,
sizeof
(
struct
mmc_command
));
memset
(
&
data
,
0
,
sizeof
(
struct
mmc_data
));
...
...
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