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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080130142014.GA2164@tv-sign.ru>
Date:	Wed, 30 Jan 2008 17:20:14 +0300
From:	Oleg Nesterov <oleg@...sign.ru>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Miklos Szeredi <mszeredi@...e.cz>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	William Lee Irwin III <wli@...omorphy.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	stable@...nel.org
Subject: [PATCH] sys_remap_file_pages: fix ->vm_file accounting

Fix ->vm_file accounting, mmap_region() may do do_munmap().

Signed-off-by: Oleg Nesterov <oleg@...sign.ru>

--- MM/mm/fremap.c~RFP	2007-10-25 16:22:12.000000000 +0400
+++ MM/mm/fremap.c	2008-01-30 16:56:39.000000000 +0300
@@ -192,8 +192,10 @@ asmlinkage long sys_remap_file_pages(uns
 			unsigned long addr;
 
 			flags &= MAP_NONBLOCK;
+			get_file(vma->vm_file);
 			addr = mmap_region(vma->vm_file, start, size,
 					flags, vma->vm_flags, pgoff, 1);
+			fput(vma->vm_file);
 			if (IS_ERR_VALUE(addr)) {
 				err = addr;
 			} else {

--
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