From: Andrew Morton <akpm@osdl.org>
To: Sridhar Samudrala <sri@us.ibm.com>
Cc: hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: CONFIG_DEBUG_PAGEALLOC and virt_addr_valid()
Date: Thu, 1 Apr 2004 16:29:43 -0800 [thread overview]
Message-ID: <20040401162943.149ee719.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0404011236200.5095@localhost.localdomain>
Sridhar Samudrala <sri@us.ibm.com> wrote:
>
> On Thu, 1 Apr 2004, Christoph Hellwig wrote:
>
> > On Thu, Apr 01, 2004 at 11:11:39AM -0800, Sridhar Samudrala wrote:
> > > When CONFIG_DEBUG_PAGEALLOC is enabled, i am noticing that virt_addr_valid()
> > > (called from sctp_is_valid_kaddr()) is returning true even for freed objects.
> > > Is this a bug or expected behavior?
> >
> > Generally every use of virt_addr_valid() is a bug. What are you trying to
> > do?
>
> We are trying to validate a kernel address that is passed by the user. Is
> there a better way to do that?
yup. Pass the user an integer.
> When an SCTP association is established, the pointer to the association
> structure is passed to the user as an identifier of the association. This
> identifier is used in the later calls by the user.
Please don't do that. See lib/idr.c. I expect it does exactly what you
want.
next prev parent reply other threads:[~2004-04-02 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-01 19:11 Sridhar Samudrala
2004-04-01 19:30 ` Dave Hansen
2004-04-01 19:44 ` Christoph Hellwig
2004-04-01 20:58 ` Sridhar Samudrala
2004-04-01 21:15 ` Richard B. Johnson
2004-04-02 0:29 ` Andrew Morton [this message]
2004-04-02 1:39 ` Sridhar Samudrala
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=20040401162943.149ee719.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sri@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®