From: Richard Hirst <rhirst@linuxcare.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] kernel bug in mmap
Date: Fri, 31 Aug 2001 00:05:56 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590698805108@msgid-missing> (raw)
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(¤t->mm->mmap_sem);
addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
up_write(¤t->mm->mmap_sem);
-
+out:
if (file)
fput(file);
return addr;
next reply other threads:[~2001-08-31 0:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-31 0:05 Richard Hirst [this message]
2001-08-31 0:40 ` [Linux-ia64] kernel bug in mmap David Mosberger
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=marc-linux-ia64-105590698805108@msgid-missing \
--to=rhirst@linuxcare.com \
--cc=linux-ia64@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.