mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [git pull] dma-debug fixes for 2.6.31-rc1
@ 2009-07-03  8:32 Joerg Roedel
  2009-07-03  8:32 ` [PATCH 1/2] dma-debug: fix off-by-one error in overlap function Joerg Roedel
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel

Hi Ingo,

The following changes since commit 7c5371c403abb29f01bc6cff6c5096abdf2dc524:
  Yinghai Lu (1):
        x86: add boundary check for 32bit res before expand e820 resource to alignment

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-debug/fixes

Ingo Molnar (1):
      dma-debug: Put all hash-chain locks into the same lock class

Joerg Roedel (1):
      dma-debug: fix off-by-one error in overlap function

 lib/dma-debug.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

These patches make dma-debug work better with lockdep enabled and fix a corner
case in the overlap function were one region ends exactly where the other one
begins. Please pull.

Thanks,

	Joerg



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] dma-debug: fix off-by-one error in overlap function
  2009-07-03  8:32 [git pull] dma-debug fixes for 2.6.31-rc1 Joerg Roedel
@ 2009-07-03  8:32 ` Joerg Roedel
  2009-07-03  8:32 ` [PATCH 2/2] dma-debug: Put all hash-chain locks into the same lock class Joerg Roedel
  2009-07-03  9:03 ` [git pull] dma-debug fixes for 2.6.31-rc1 Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Joerg Roedel, stable

This patch fixes a bug in the overlap function which returned true if
one region ends exactly before the second region begins. This is no
overlap but the function returned true in that case.

Cc: stable@kernel.org
Reported-by: Andrew Randrianasulu <randrik@mail.ru>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 lib/dma-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index 3b93129..a9b6b5c 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -862,7 +862,7 @@ static inline bool overlap(void *addr, u64 size, void *start, void *end)
 
 	return ((addr >= start && addr < end) ||
 		(addr2 >= start && addr2 < end) ||
-		((addr < start) && (addr2 >= end)));
+		((addr < start) && (addr2 > end)));
 }
 
 static void check_for_illegal_area(struct device *dev, void *addr, u64 size)
-- 
1.6.3.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] dma-debug: Put all hash-chain locks into the same lock class
  2009-07-03  8:32 [git pull] dma-debug fixes for 2.6.31-rc1 Joerg Roedel
  2009-07-03  8:32 ` [PATCH 1/2] dma-debug: fix off-by-one error in overlap function Joerg Roedel
@ 2009-07-03  8:32 ` Joerg Roedel
  2009-07-03  9:03 ` [git pull] dma-debug fixes for 2.6.31-rc1 Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Joerg Roedel @ 2009-07-03  8:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Ingo Molnar, Joerg Roedel

From: Ingo Molnar <mingo@elte.hu>

Alan Cox reported that lockdep runs out of its stack-trace entries
with certain configs:

 BUG: MAX_STACK_TRACE_ENTRIES too low

This happens because there are 1024 hash buckets, each with a
separate lock. Lockdep puts each lock into a separate lock class and
tracks them independently.

But in reality we never take more than one of the buckets, so they
really belong into a single lock-class. Annotate the has bucket lock
init accordingly.

[ Impact: reduce the lockdep footprint of dma-debug ]

Reported-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 lib/dma-debug.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index a9b6b5c..c9187fe 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -716,7 +716,7 @@ void dma_debug_init(u32 num_entries)
 
 	for (i = 0; i < HASH_SIZE; ++i) {
 		INIT_LIST_HEAD(&dma_entry_hash[i].list);
-		dma_entry_hash[i].lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&dma_entry_hash[i].lock);
 	}
 
 	if (dma_debug_fs_init() != 0) {
-- 
1.6.3.3



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [git pull] dma-debug fixes for 2.6.31-rc1
  2009-07-03  8:32 [git pull] dma-debug fixes for 2.6.31-rc1 Joerg Roedel
  2009-07-03  8:32 ` [PATCH 1/2] dma-debug: fix off-by-one error in overlap function Joerg Roedel
  2009-07-03  8:32 ` [PATCH 2/2] dma-debug: Put all hash-chain locks into the same lock class Joerg Roedel
@ 2009-07-03  9:03 ` Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-07-03  9:03 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: linux-kernel


* Joerg Roedel <joerg.roedel@amd.com> wrote:

> Hi Ingo,
> 
> The following changes since commit 7c5371c403abb29f01bc6cff6c5096abdf2dc524:
>   Yinghai Lu (1):
>         x86: add boundary check for 32bit res before expand e820 resource to alignment
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu.git dma-debug/fixes
> 
> Ingo Molnar (1):
>       dma-debug: Put all hash-chain locks into the same lock class
> 
> Joerg Roedel (1):
>       dma-debug: fix off-by-one error in overlap function
> 
>  lib/dma-debug.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> These patches make dma-debug work better with lockdep enabled and 
> fix a corner case in the overlap function were one region ends 
> exactly where the other one begins. Please pull.

Pulled, thanks Joerg!

	Ingo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-03  9:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-03  8:32 [git pull] dma-debug fixes for 2.6.31-rc1 Joerg Roedel
2009-07-03  8:32 ` [PATCH 1/2] dma-debug: fix off-by-one error in overlap function Joerg Roedel
2009-07-03  8:32 ` [PATCH 2/2] dma-debug: Put all hash-chain locks into the same lock class Joerg Roedel
2009-07-03  9:03 ` [git pull] dma-debug fixes for 2.6.31-rc1 Ingo Molnar

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®