All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 1/1] Maps fix
Date: Wed, 29 Sep 2010 12:12:38 +0200	[thread overview]
Message-ID: <4CA31116.8050301@redhat.com> (raw)
In-Reply-To: <867a4bada2ee53fcf310d54788e3b08868d5031e.1285601408.git.zkabelac@redhat.com>

On 09/27/2010 05:31 PM, Zdenek Kabelac wrote:
> Read complete content of /proc/self/maps into one buffer without
> realocation in the middle of reading and before doing any m/unlock
> operation with these lines - as some of them gets change.
> With previous implementation we've read some mappings twice ([stack])

ACK, if it solves the problem with lock != unlock size error....

> +		for (len = 0 ; len < _maps_len; len += n) {
> +			if (!(n = read(_maps_fd, _maps_buffer + len, _maps_len - len))) {
> +				_maps_buffer[len] = '0';

typo '\0' :)

for the parsing simple lines it is quite complicated code but if we cannot get
file size from /proc in advance...

Milan



      reply	other threads:[~2010-09-29 10:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-27 15:31 [PATCH 0/1] memlock_fix Zdenek Kabelac
2010-09-27 15:31 ` [PATCH 1/1] Maps fix Zdenek Kabelac
2010-09-29 10:12   ` Milan Broz [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=4CA31116.8050301@redhat.com \
    --to=mbroz@redhat.com \
    --cc=lvm-devel@redhat.com \
    /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.