From: Adrian Hunter <adrian.hunter@nokia.com>
To: "Singh, Vimal" <vimalsingh@ti.com>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: Re: Is high_memory check in omap2.c for OneNAND is sufficient?
Date: Thu, 26 Mar 2009 10:13:44 +0200 [thread overview]
Message-ID: <49CB3938.9010207@nokia.com> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E73940427A869E7@dbde02.ent.ti.com>
Singh, Vimal wrote:
> From: Adrian Hunter [adrian.hunter@nokia.com]
>> Singh, Vimal wrote:
>>> From: Adrian Hunter [adrian.hunter@nokia.com]
>>>> Singh, Vimal wrote:
>>>>> There is check for 'high_memory' in 'drivers/mtd/onenand/omap2.c', always before doing 'dma_map_single'.
>>>>> Snippet:
>>>>> ----------------------
>>>>> if (buf >= high_memory) {
>>>>> struct page *p1;
>>>>> ----------------------
>>>>> This check seems not sufficient. There should be a check for upper boundary too.
>>>>> Thinking scenario when 'buf' is less than 'high_memory', but somewhere near to it, and 'count' is big enough to beyond 'high_memory'.
>>>> AFAIK it is not possible to allocate memory that crosses the high_memory boundary.
>>> Do you mean 'buf' can not cross 'high_memory' boundary?
>> Yes.
> If so, then I wonder why above check is present in code...
>
Which check?
>>> But then I have seen a case where it was crossing that and BUG was reported by function 'dma_cache_maint'.
>> Is it possible that 'buf' or 'count' is wrong?
> I do not think so...
>
next prev parent reply other threads:[~2009-03-26 8:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-24 15:20 Is high_memory check in omap2.c for OneNAND is sufficient? Singh, Vimal
2009-03-24 15:44 ` Adrian Hunter
2009-03-25 9:58 ` Singh, Vimal
2009-03-25 10:43 ` Adrian Hunter
2009-03-25 14:54 ` Singh, Vimal
2009-03-26 8:13 ` Adrian Hunter [this message]
2009-03-26 8:42 ` Singh, Vimal
2009-03-26 8:55 ` Adrian Hunter
2009-03-26 14:51 ` Singh, Vimal
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=49CB3938.9010207@nokia.com \
--to=adrian.hunter@nokia.com \
--cc=linux-mtd@lists.infradead.org \
--cc=vimalsingh@ti.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