projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab8e92e
)
[PATCH] NOMMU: don't try and give NULL to fput()
author
Gavin Lambert
<gavinl@compacsort.com>
Sun, 1 Oct 2006 06:27:01 +0000
(23:27 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Sun, 1 Oct 2006 07:39:17 +0000
(
00:39
-0700)
Don't try and give NULL to fput() in the error handling in do_mmap_pgoff()
as it'll cause an oops.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/nommu.c
patch
|
blob
|
blame
|
history
diff --git
a/mm/nommu.c
b/mm/nommu.c
index 564540662192290b67f4a000c969407c404e86ad..365019599df8556c23d493f007a07dbf201add00 100644
(file)
--- a/
mm/nommu.c
+++ b/
mm/nommu.c
@@
-948,7
+948,8
@@
unsigned long do_mmap_pgoff(struct file *file,
up_write(&nommu_vma_sem);
kfree(vml);
if (vma) {
- fput(vma->vm_file);
+ if (vma->vm_file)
+ fput(vma->vm_file);
kfree(vma);
}
return ret;