From: David Howells <dhowells@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com
Subject: [PATCH] NOMMU: Don't try and give NULL to fput()
Date: Fri, 29 Sep 2006 10:35:14 +0100 [thread overview]
Message-ID: <20060929093514.5688.55320.stgit@warthog.cambridge.redhat.com> (raw)
From: Gavin Lambert <gavinl@compacsort.com>
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>
---
mm/nommu.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mm/nommu.c b/mm/nommu.c
index 5645406..3650195 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -948,7 +948,8 @@ #endif
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;
reply other threads:[~2006-09-29 9:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060929093514.5688.55320.stgit@warthog.cambridge.redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®