From: Andrew Morton <akpm@linux-foundation.org>
To: Sebastian Ott <sebott@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org,
Florian Fainelli <f.fainelli@gmail.com>,
Horia Geanta <horia.geanta@freescale.com>,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH] lib/dma-debug: fix bucket_find_contain
Date: Thu, 19 Mar 2015 15:09:01 -0700 [thread overview]
Message-ID: <20150319150901.a004c3dc15a49a1859e467ff@linux-foundation.org> (raw)
In-Reply-To: <alpine.LFD.2.11.1503161919270.1763@denkbrett>
On Mon, 16 Mar 2015 19:24:29 +0100 (CET) Sebastian Ott <sebott@linux.vnet.ibm.com> wrote:
> bucket_find_contain will search the bucket list for a dma_debug_entry. When
> the entry isn't found it needs to search other buckets too, since only the
> start address of a dma range is hashed (which might be in a different bucket).
>
> A copy of the dma_debug_entry is used to get the previous hash bucket but when
> its list is searched the original dma_debug_entry is to be used not its
> modified copy.
>
> This fixes false "device driver tries to sync DMA memory it has not allocated"
> warnings.
The changelog doesn't help me understand how serious this is. A 4.0
thing? -stable?
> --- a/lib/dma-debug.c
> +++ b/lib/dma-debug.c
> @@ -361,7 +361,7 @@ static struct dma_debug_entry *bucket_fi
> unsigned int range = 0;
>
> while (range <= max_range) {
> - entry = __hash_bucket_find(*bucket, &index, containing_match);
> + entry = __hash_bucket_find(*bucket, ref, containing_match);
>
> if (entry)
> return entry;
This code just got more confusing :( Are you sure we aren't supposed to
use `ref' in bucket_find_contain()'s call to get_hash_bucket()?
next prev parent reply other threads:[~2015-03-19 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 18:24 [PATCH] lib/dma-debug: fix bucket_find_contain Sebastian Ott
2015-03-19 22:09 ` Andrew Morton [this message]
2015-03-20 9:10 ` Sebastian Ott
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=20150319150901.a004c3dc15a49a1859e467ff@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=f.fainelli@gmail.com \
--cc=horia.geanta@freescale.com \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=sebott@linux.vnet.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