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
531b536d
Commit
531b536d
authored
Apr 02, 2002
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] wrong return codes in ipc shm
We always returned success even when we had no ->vm_ops
parent
4d148125
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
ipc/shm.c
ipc/shm.c
+5
-2
No files found.
ipc/shm.c
View file @
531b536d
...
@@ -674,16 +674,19 @@ asmlinkage long sys_shmdt (char *shmaddr)
...
@@ -674,16 +674,19 @@ asmlinkage long sys_shmdt (char *shmaddr)
{
{
struct
mm_struct
*
mm
=
current
->
mm
;
struct
mm_struct
*
mm
=
current
->
mm
;
struct
vm_area_struct
*
shmd
,
*
shmdnext
;
struct
vm_area_struct
*
shmd
,
*
shmdnext
;
int
retval
=
-
EINVAL
;
down_write
(
&
mm
->
mmap_sem
);
down_write
(
&
mm
->
mmap_sem
);
for
(
shmd
=
mm
->
mmap
;
shmd
;
shmd
=
shmdnext
)
{
for
(
shmd
=
mm
->
mmap
;
shmd
;
shmd
=
shmdnext
)
{
shmdnext
=
shmd
->
vm_next
;
shmdnext
=
shmd
->
vm_next
;
if
(
shmd
->
vm_ops
==
&
shm_vm_ops
if
(
shmd
->
vm_ops
==
&
shm_vm_ops
&&
shmd
->
vm_start
-
(
shmd
->
vm_pgoff
<<
PAGE_SHIFT
)
==
(
ulong
)
shmaddr
)
&&
shmd
->
vm_start
-
(
shmd
->
vm_pgoff
<<
PAGE_SHIFT
)
==
(
ulong
)
shmaddr
)
{
do_munmap
(
mm
,
shmd
->
vm_start
,
shmd
->
vm_end
-
shmd
->
vm_start
);
do_munmap
(
mm
,
shmd
->
vm_start
,
shmd
->
vm_end
-
shmd
->
vm_start
);
retval
=
0
;
}
}
}
up_write
(
&
mm
->
mmap_sem
);
up_write
(
&
mm
->
mmap_sem
);
return
0
;
return
retval
;
}
}
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
...
...
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