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
864fe516
Commit
864fe516
authored
May 20, 2008
by
Arnd Bergmann
Committed by
Jonathan Corbet
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apm_32: BKL pushdown
Signed-off-by:
Arnd Bergmann
<
arnd@arndb.de
>
parent
2861ead3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
arch/x86/kernel/apm_32.c
arch/x86/kernel/apm_32.c
+4
-0
No files found.
arch/x86/kernel/apm_32.c
View file @
864fe516
...
@@ -204,6 +204,7 @@
...
@@ -204,6 +204,7 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/poll.h>
#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/stddef.h>
#include <linux/timer.h>
#include <linux/timer.h>
...
@@ -1544,10 +1545,12 @@ static int do_open(struct inode *inode, struct file *filp)
...
@@ -1544,10 +1545,12 @@ static int do_open(struct inode *inode, struct file *filp)
{
{
struct
apm_user
*
as
;
struct
apm_user
*
as
;
lock_kernel
();
as
=
kmalloc
(
sizeof
(
*
as
),
GFP_KERNEL
);
as
=
kmalloc
(
sizeof
(
*
as
),
GFP_KERNEL
);
if
(
as
==
NULL
)
{
if
(
as
==
NULL
)
{
printk
(
KERN_ERR
"apm: cannot allocate struct of size %d bytes
\n
"
,
printk
(
KERN_ERR
"apm: cannot allocate struct of size %d bytes
\n
"
,
sizeof
(
*
as
));
sizeof
(
*
as
));
unlock_kernel
();
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
as
->
magic
=
APM_BIOS_MAGIC
;
as
->
magic
=
APM_BIOS_MAGIC
;
...
@@ -1569,6 +1572,7 @@ static int do_open(struct inode *inode, struct file *filp)
...
@@ -1569,6 +1572,7 @@ static int do_open(struct inode *inode, struct file *filp)
user_list
=
as
;
user_list
=
as
;
spin_unlock
(
&
user_list_lock
);
spin_unlock
(
&
user_list_lock
);
filp
->
private_data
=
as
;
filp
->
private_data
=
as
;
unlock_kernel
();
return
0
;
return
0
;
}
}
...
...
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