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
e02f27ca
Commit
e02f27ca
authored
Sep 25, 2003
by
Randy Dunlap
Committed by
Linus Torvalds
Sep 25, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] janitor: rio_linux: user get/put_user for errors (not
From: Domen Puncer <domen@coderock.org>
parent
acf658db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
drivers/char/rio/rio_linux.c
drivers/char/rio/rio_linux.c
+6
-14
No files found.
drivers/char/rio/rio_linux.c
View file @
e02f27ca
...
...
@@ -689,9 +689,7 @@ static int rio_ioctl (struct tty_struct * tty, struct file * filp,
break;
#endif
case
TIOCSSOFTCAR
:
if
((
rc
=
verify_area
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
int
)))
==
0
)
{
get_user
(
ival
,
(
unsigned
int
*
)
arg
);
if
((
rc
=
get_user
(
ival
,
(
unsigned
int
*
)
arg
))
==
0
)
{
tty
->
termios
->
c_cflag
=
(
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
(
ival
?
CLOCAL
:
0
);
...
...
@@ -741,25 +739,19 @@ static int rio_ioctl (struct tty_struct * tty, struct file * filp,
}
break;
case TIOCMBIS:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
sizeof(unsigned int))) == 0) {
get_user(ival, (unsigned int *) arg);
if ((rc = get_user(ival, (unsigned int *) arg)) == 0) {
rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : -1),
((ival & TIOCM_RTS) ? 1 : -1));
}
break;
case TIOCMBIC:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
sizeof(unsigned int))) == 0) {
get_user(ival, (unsigned int *) arg);
if ((rc = get_user(ival, (unsigned int *) arg)) == 0) {
rio_setsignals(port, ((ival & TIOCM_DTR) ? 0 : -1),
((ival & TIOCM_RTS) ? 0 : -1));
}
break;
case TIOCMSET:
if ((rc = verify_area(VERIFY_READ, (void *) arg,
sizeof(unsigned int))) == 0) {
get_user(ival, (unsigned int *) arg);
if ((rc = get_user(ival, (unsigned int *) arg)) == 0) {
rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : 0),
((ival & TIOCM_RTS) ? 1 : 0));
}
...
...
@@ -1010,9 +1002,9 @@ static int rio_init_datastructures (void)
free6:
for
(
i
--
;
i
>=
0
;
i
--
)
kfree
(
p
->
RIOPortp
[
i
]);
/*free5:
*/
/*free5:
free4:
free3:
kfree
(
p
->
RIOPortp
);
free3:
*/
kfree
(
p
->
RIOPortp
);
free2:
kfree
(
p
->
RIOHosts
);
free1:
rio_dprintk
(
RIO_DEBUG_INIT
,
"Not enough memory! %p %p %p
\n
"
,
...
...
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