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
538316d2
Commit
538316d2
authored
Mar 16, 2003
by
Andrew Morton
Committed by
Dave Jones
Mar 16, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] fix devfs oops
The recent (untested?) "cleanup" removed a null-pointer test.
parent
5054ed20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
fs/devfs/base.c
fs/devfs/base.c
+4
-1
No files found.
fs/devfs/base.c
View file @
538316d2
...
@@ -1802,8 +1802,11 @@ int devfs_generate_path (devfs_handle_t de, char *path, int buflen)
...
@@ -1802,8 +1802,11 @@ int devfs_generate_path (devfs_handle_t de, char *path, int buflen)
static
struct
file_operations
*
devfs_get_ops
(
devfs_handle_t
de
)
static
struct
file_operations
*
devfs_get_ops
(
devfs_handle_t
de
)
{
{
struct
file_operations
*
ops
=
de
->
u
.
cdev
.
ops
;
struct
file_operations
*
ops
=
de
->
u
.
cdev
.
ops
;
struct
module
*
owner
=
ops
->
owner
;
struct
module
*
owner
;
if
(
!
ops
)
return
NULL
;
owner
=
ops
->
owner
;
read_lock
(
&
de
->
parent
->
u
.
dir
.
lock
);
/* Prevent module from unloading */
read_lock
(
&
de
->
parent
->
u
.
dir
.
lock
);
/* Prevent module from unloading */
if
(
(
de
->
next
==
de
)
||
!
try_module_get
(
owner
)
)
if
(
(
de
->
next
==
de
)
||
!
try_module_get
(
owner
)
)
{
/* Entry is already unhooked or module is unloading */
{
/* Entry is already unhooked or module is unloading */
...
...
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