lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20060929093514.5688.55320.stgit@warthog.cambridge.redhat.com>
Date:	Fri, 29 Sep 2006 10:35:14 +0100
From:	David Howells <dhowells@...hat.com>
To:	akpm@...l.org
Cc:	linux-kernel@...r.kernel.org, dhowells@...hat.com
Subject: [PATCH] NOMMU: Don't try and give NULL to fput()

From: Gavin Lambert <gavinl@...pacsort.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@...hat.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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ