From: Fredrik Noring <noring-zgYzP9v7iJcdnm+yROfE0A@public.gmane.org>
To: Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org>,
Marek Szyprowski
<m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
Cc: "Jürgen Urban" <JuergenUrban-Mmb7MZpHnFY@public.gmane.org>,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: WARN_ON(irqs_disabled()) in dma_free_attrs?
Date: Fri, 2 Mar 2018 19:07:06 +0100 [thread overview]
Message-ID: <20180302180704.GA3846@localhost.localdomain> (raw)
Hello DMA mapping helpers maintainers,
I'm porting the PS2 OHCI driver to v4.15 and it triggers
WARN_ON(irqs_disabled());
in include/linux/dma-mapping.h:dma_free_attrs (trace below). USB maintainer
Alan Stern notes in
https://www.spinics.net/lists/linux-usb/msg162817.html
that
This is caused by a deficiency in the DMA core: dma_free_coherent()
wants interrupts to be enabled when it is called. I'm not sure how
the other host controller drivers cope with this.
What is the best way to proceed? Can dma_free_attrs be reworked to handle
disabled IRQs?
Fredrik
------------[ cut here ]------------
WARNING: CPU: 0 PID: 50 at ./include/linux/dma-mapping.h:537 hcd_buffer_free+0x130/0x200
Modules linked in:
CPU: 0 PID: 50 Comm: echo Not tainted 4.15.0+ #1001
Stack : 81f30ab8 803ed49c 00000003 0000000b 805a3a08 805454c4 00000099 800610dc
00000009 00000219 00000001 fffffff3 00000099 10058400 81c09a20 00000001
00000000 00000000 805a0000 00000001 0000000a 00000002 00000001 6d6f4320
80420770 0000000f 81c098d8 81c098a0 80000000 00000000 802f4690 804e3f8c
00000009 00000219 00000001 fffffff3 00000000 00000000 00000000 805a0000
...
Call Trace:
[<1f603d86>] show_stack+0x74/0x104
[<add27dec>] __warn+0x118/0x120
[<c729dcd6>] warn_slowpath_null+0x44/0x58
[<c7e21a9a>] hcd_buffer_free+0x130/0x200
[<61864241>] usb_hcd_unmap_urb_for_dma+0x160/0x16c
[<d52afbb3>] __usb_hcd_giveback_urb+0x5c/0x120
[<3a41e8a9>] finish_urb+0x98/0x138
[<9278d9d1>] ohci_work+0x14c/0x494
[<49e08409>] ohci_irq+0x134/0x2dc
[<673da5e4>] usb_hcd_irq+0x2c/0x44
[<5d46375d>] __handle_irq_event_percpu+0x98/0x158
[<a3455ed6>] handle_irq_event_percpu+0x20/0x64
[<e92d5f7a>] handle_irq_event+0x3c/0x64
[<bebbf000>] handle_level_irq+0xe4/0x120
[<9e612100>] generic_handle_irq+0x28/0x38
[<02b6b3c9>] do_IRQ+0x18/0x24
---[ end trace 9dc1d2a5ee71f57d ]---
next reply other threads:[~2018-03-02 18:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 18:07 Fredrik Noring [this message]
[not found] ` <20180302180704.GA3846-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2018-03-02 19:55 ` WARN_ON(irqs_disabled()) in dma_free_attrs? Robin Murphy
[not found] ` <bfe85e97-2974-06ee-8c6d-f8e8a83348ea-5wv7dgnIgG8@public.gmane.org>
2018-03-02 21:47 ` Christoph Hellwig
2018-03-03 7:58 ` Fredrik Noring
2018-03-02 21:37 ` Christoph Hellwig
[not found] ` <20180302213711.GA30356-jcswGhMUV9g@public.gmane.org>
2018-03-03 8:22 ` Fredrik Noring
[not found] ` <20180303082234.GB24991-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2018-03-03 16:12 ` Christoph Hellwig
[not found] ` <20180303161249.GA9516-jcswGhMUV9g@public.gmane.org>
2018-03-03 18:19 ` Fredrik Noring
[not found] ` <20180303181904.GA19076-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2018-03-04 15:58 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1803041054540.13805-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2018-03-04 17:59 ` Fredrik Noring
[not found] ` <20180304175949.GB2368-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2018-03-05 2:05 ` Alan Stern
2018-03-05 15:10 ` Christoph Hellwig
[not found] ` <20180305151010.GA15965-jcswGhMUV9g@public.gmane.org>
2018-03-11 18:01 ` Fredrik Noring
[not found] ` <20180311180124.GA27731-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2018-03-13 12:11 ` Robin Murphy
[not found] ` <5696e17e-e0f4-4e6c-7783-4eeea0ff7a5e-5wv7dgnIgG8@public.gmane.org>
2018-03-13 13:17 ` Christoph Hellwig
[not found] ` <20180313131745.GC6260-jcswGhMUV9g@public.gmane.org>
2018-03-14 17:43 ` Robin Murphy
[not found] ` <d0659e5e-4be7-9a1e-fb8e-b418962d74de-5wv7dgnIgG8@public.gmane.org>
2018-03-15 7:58 ` Christoph Hellwig
[not found] ` <20180315075831.GB12136-jcswGhMUV9g@public.gmane.org>
2018-03-15 13:11 ` Robin Murphy
[not found] ` <dfc5505e-9ab9-2d81-2fc5-623730a68ba9-5wv7dgnIgG8@public.gmane.org>
2018-06-22 14:56 ` Fredrik Noring
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=20180302180704.GA3846@localhost.localdomain \
--to=noring-zgyzp9v7ijcdnm+yrofe0a@public.gmane.org \
--cc=JuergenUrban-Mmb7MZpHnFY@public.gmane.org \
--cc=hch-jcswGhMUV9g@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).