From: Andreas Dilger <adilger@turbolabs.com>
To: Thorsten Kukuk <kukuk@suse.de>
Cc: linux-kernel@vger.kernel.org, Heinz.Mauelshagen@t-online.de
Subject: Re: Bug in /proc/lvm/global (garbage printed)
Date: Sat, 10 Nov 2001 17:55:07 -0700 [thread overview]
Message-ID: <20011110175507.L1778@lynx.no> (raw)
In-Reply-To: <20011110120619.A10459@suse.de>
In-Reply-To: <20011110120619.A10459@suse.de>; from kukuk@suse.de on Sat, Nov 10, 2001 at 12:06:19PM +0100
On Nov 10, 2001 12:06 +0100, Thorsten Kukuk wrote:
> The problem is in the _proc_read_global function. This function does
> not use the "page" parameter to return the data. Instead it allocates
> it's own buffer and change to "start" parameter to point to it.
>
> --- drivers/md/lvm-fs.c 2001/11/09 19:00:38 1.1
> +++ drivers/md/lvm-fs.c 2001/11/09 20:50:16
> @@ -482,11 +480,15 @@
> buf = NULL;
> return 0;
> }
> - *start = &buf[pos];
> - if (sz - pos < count)
> + /* *start = &buf[pos]; */
> + if (sz - pos < count) {
> + memcpy (page, &buf[pos], sz - pos);
> return sz - pos;
> - else
> + }
> + else {
> + memcpy (page, &buf[pos], count);
> return count;
> + }
>
> #undef LVM_PROC_BUF
> }
What version of LVM do you have? This code looks different than mine.
The file lvm-fs.c does not exist in Linus kernels, only in patched kernels.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next prev parent reply other threads:[~2001-11-11 0:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-10 11:06 Bug in /proc/lvm/global (garbage printed) Thorsten Kukuk
2001-11-10 13:38 ` Luigi Genoni
2001-11-11 0:55 ` Andreas Dilger [this message]
2001-11-11 7:36 ` Thorsten Kukuk
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=20011110175507.L1778@lynx.no \
--to=adilger@turbolabs.com \
--cc=Heinz.Mauelshagen@t-online.de \
--cc=kukuk@suse.de \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox