public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] kernel bug in mmap
@ 2001-08-31  0:05 Richard Hirst
  2001-08-31  0:40 ` David Mosberger
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Hirst @ 2001-08-31  0:05 UTC (permalink / raw)
  To: linux-ia64

Hi,
  Attempts to mmap an empty file result in the file being left busy,
such that the file system cannot be unmounted.  Fix below.

Richard


--- linux/arch/ia64/kernel/sys_ia64.cold	Fri Aug 31 01:37:58 2001
+++ linux/arch/ia64/kernel/sys_ia64.c	Fri Aug 31 01:38:43 2001
@@ -194,7 +194,7 @@
 	 */
 	len = PAGE_ALIGN(len);
 	if (len = 0)
-		return addr;
+		goto out;
 
 	/* don't permit mappings into unmapped space or the virtual page table of a region: */
 	roff = rgn_offset(addr);
@@ -208,7 +208,7 @@
 	down_write(&current->mm->mmap_sem);
 	addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
 	up_write(&current->mm->mmap_sem);
-
+out:
 	if (file)
 		fput(file);
 	return addr;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Linux-ia64] kernel bug in mmap
  2001-08-31  0:05 [Linux-ia64] kernel bug in mmap Richard Hirst
@ 2001-08-31  0:40 ` David Mosberger
  0 siblings, 0 replies; 2+ messages in thread
From: David Mosberger @ 2001-08-31  0:40 UTC (permalink / raw)
  To: linux-ia64

>>>>> On Fri, 31 Aug 2001 01:05:56 +0100, Richard Hirst <rhirst@linuxcare.com> said:

  Richard> Hi, Attempts to mmap an empty file result in the file being
  Richard> left busy, such that the file system cannot be unmounted.
  Richard> Fix below.

Thanks for the patch.  There seem to be several other error conditions
in do_mmap2() in which the fput() is skipped.  I'll fix those, too.

Thanks,

	--david



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-31  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-31  0:05 [Linux-ia64] kernel bug in mmap Richard Hirst
2001-08-31  0:40 ` David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox