From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: linux-mm@kvack.org
Subject: Usage of get_user_pages() in fs/aio.c
Date: Wed, 6 Nov 2002 21:15:38 +0100 [thread overview]
Message-ID: <20021106211538.M659@nightmaster.csn.tu-chemnitz.de> (raw)
Hi Ben,
in kernel 2.5.46 in file fs/aio.c line 150 you use
get_user_pages() in a way that makes no sense to me.
Your call is:
info->nr_pages = get_user_pages(current, ctx->mm,
info->mmap_base, info->mmap_size,
1, 0, info->ring_pages, NULL);
info->mmap_size contains the number of BYTES mapped by the pages
in the ring_pages ARRAY.
get_user_pages() expects the number of ELEMENTS in the array
instead.
What this can cause is clear ;-)
Simple fix would be to replace "info->mmap_size" with "nr_pages",
that you compute just some lines above.
Please tell me, if I'm wrong here.
Regards
Ingo Oeser
--
Science is what we can tell a computer. Art is everything else. --- D.E.Knuth
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
next reply other threads:[~2002-11-06 20:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-06 20:15 Ingo Oeser [this message]
2002-11-07 19:46 ` Benjamin LaHaise
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=20021106211538.M659@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=bcrl@redhat.com \
--cc=linux-mm@kvack.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