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
39d95b9d
Commit
39d95b9d
authored
May 16, 2008
by
Jonathan Corbet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: cdev lock_kernel() pushdown
Parts of the serial code actually BUG() if we don't do this.
parent
c43ef174
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
2 deletions
+25
-2
drivers/char/tty_io.c
drivers/char/tty_io.c
+25
-2
No files found.
drivers/char/tty_io.c
View file @
39d95b9d
...
...
@@ -2665,7 +2665,7 @@ static void release_dev(struct file *filp)
* ->siglock protects ->signal/->sighand
*/
static
int
tty_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
__
tty_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
struct
tty_struct
*
tty
;
int
noctty
,
retval
;
...
...
@@ -2779,6 +2779,19 @@ got_driver:
return
0
;
}
/* BKL pushdown: scary code avoidance wrapper */
static
int
tty_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
int
ret
;
lock_kernel
();
ret
=
__tty_open
(
inode
,
filp
);
unlock_kernel
();
return
ret
;
}
#ifdef CONFIG_UNIX98_PTYS
/**
* ptmx_open - open a unix 98 pty master
...
...
@@ -2792,7 +2805,7 @@ got_driver:
* allocated_ptys_lock handles the list of free pty numbers
*/
static
int
ptmx_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
__
ptmx_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
struct
tty_struct
*
tty
;
int
retval
;
...
...
@@ -2831,6 +2844,16 @@ out:
devpts_kill_index
(
index
);
return
retval
;
}
static
int
ptmx_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
int
ret
;
lock_kernel
();
ret
=
__ptmx_open
(
inode
,
filp
);
unlock_kernel
();
return
ret
;
}
#endif
/**
...
...
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