From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Mark Jackson <mpfj-list@mimc.co.uk>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: Advice on mmap() "feature"
Date: Mon, 17 Sep 2012 12:17:17 +0100 [thread overview]
Message-ID: <20120917121717.2c99d28f@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <505626A8.8040806@mimc.co.uk>
> (a) Since all the mappings have been removed, so why don't the fd's get
> released ?
Because your code is buggy.
Firstly its files it keeps a reference to not file handles, so your close
closes the file handle. You do however end up with lots of file structs
pinned and that's because you've got a bug.
You map twice as much as you unmap, the kernel therefore keeps the second
half mapped for you. Fix your munmap and all will be happy.
You owe the oracle an ice cream
Alan
prev parent reply other threads:[~2012-09-17 11:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 19:21 Mark Jackson
2012-09-16 20:52 ` richard -rw- weinberger
2012-09-17 7:54 ` Mark Jackson
2012-09-17 11:17 ` Alan Cox [this message]
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=20120917121717.2c99d28f@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mpfj-list@mimc.co.uk \
/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
Powered by JetHome