linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dma-debug: Only skip one stackframe entry
@ 2019-04-10 21:59 Scott Wood
  2019-04-11 17:26 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Wood @ 2019-04-10 21:59 UTC (permalink / raw)
  To: Christoph Hellwig, Marek Szyprowski, Robin Murphy
  Cc: iommu, linux-kernel, David Woodhouse, Scott Wood

With skip set to 1, I get a traceback like this:

[  106.867637] DMA-API: Mapped at:
[  106.870784]  afu_dma_map_region+0x2cd/0x4f0 [dfl_afu]
[  106.875839]  afu_ioctl+0x258/0x380 [dfl_afu]
[  106.880108]  do_vfs_ioctl+0xa9/0x720
[  106.883688]  ksys_ioctl+0x60/0x90
[  106.887007]  __x64_sys_ioctl+0x16/0x20

With the previous value of 2, afu_dma_map_region was being omitted.  I
suspect that the code paths have simply changed since the value of 2 was
chosen a decade ago, but it's also possible that it varies based on which
mapping function was used, compiler inlining choices, etc.  In any case,
it's best to err on the side of skipping less.

Signed-off-by: Scott Wood <swood@redhat.com>
---
 kernel/dma/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 45d51e8e26f6..a218e43cc382 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -706,7 +706,7 @@ static struct dma_debug_entry *dma_entry_alloc(void)
 #ifdef CONFIG_STACKTRACE
 	entry->stacktrace.max_entries = DMA_DEBUG_STACKTRACE_ENTRIES;
 	entry->stacktrace.entries = entry->st_entries;
-	entry->stacktrace.skip = 2;
+	entry->stacktrace.skip = 1;
 	save_stack_trace(&entry->stacktrace);
 #endif
 
-- 
1.8.3.1


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

* Re: [PATCH] dma-debug: Only skip one stackframe entry
  2019-04-10 21:59 [PATCH] dma-debug: Only skip one stackframe entry Scott Wood
@ 2019-04-11 17:26 ` Christoph Hellwig
  2019-04-11 17:28   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2019-04-11 17:26 UTC (permalink / raw)
  To: Scott Wood
  Cc: Christoph Hellwig, Marek Szyprowski, Robin Murphy, iommu,
	linux-kernel, David Woodhouse, Thomas Gleixner

Thomas just posted a major rework in this area.  I think you are
best off rebasing it on top of that series and feeding it to him.

Otherwise this looks good to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

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

* Re: [PATCH] dma-debug: Only skip one stackframe entry
  2019-04-11 17:26 ` Christoph Hellwig
@ 2019-04-11 17:28   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2019-04-11 17:28 UTC (permalink / raw)
  To: Scott Wood
  Cc: Christoph Hellwig, Marek Szyprowski, Robin Murphy, iommu,
	linux-kernel, David Woodhouse, Thomas Gleixner

On Thu, Apr 11, 2019 at 07:26:58PM +0200, Christoph Hellwig wrote:
> Thomas just posted a major rework in this area.  I think you are
> best off rebasing it on top of that series and feeding it to him.

Actually..  Given that this series hasn't been merged yet and given
how trivial this change is I might just feed it to Linus with my
next merge request tomorrow.  That is probably easier for everyone.

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

end of thread, other threads:[~2019-04-11 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-10 21:59 [PATCH] dma-debug: Only skip one stackframe entry Scott Wood
2019-04-11 17:26 ` Christoph Hellwig
2019-04-11 17:28   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).