From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Jassi Brar <jassisinghbrar@gmail.com>,
Vinod Koul <vinod.koul@linux.intel.com>,
Tomasz Figa <t.figa@samsung.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [ 18/18] drivers/dma/pl330.c: fix locking in pl330_free_chan_resources()
Date: Thu, 18 Jul 2013 19:23:33 -0700 [thread overview]
Message-ID: <20130719021050.204528358@linuxfoundation.org> (raw)
In-Reply-To: <20130719021048.965829361@linuxfoundation.org>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
commit da331ba8e9c5de72a27e50f71105395bba6eebe0 upstream.
tasklet_kill() may sleep so call it before taking pch->lock.
Fixes following lockup:
BUG: scheduling while atomic: cat/2383/0x00000002
Modules linked in:
unwind_backtrace+0x0/0xfc
__schedule_bug+0x4c/0x58
__schedule+0x690/0x6e0
sys_sched_yield+0x70/0x78
tasklet_kill+0x34/0x8c
pl330_free_chan_resources+0x24/0x88
dma_chan_put+0x4c/0x50
[...]
BUG: spinlock lockup suspected on CPU#0, swapper/0/0
lock: 0xe52aa04c, .magic: dead4ead, .owner: cat/2383, .owner_cpu: 1
unwind_backtrace+0x0/0xfc
do_raw_spin_lock+0x194/0x204
_raw_spin_lock_irqsave+0x20/0x28
pl330_tasklet+0x2c/0x5a8
tasklet_action+0xfc/0x114
__do_softirq+0xe4/0x19c
irq_exit+0x98/0x9c
handle_IPI+0x124/0x16c
gic_handle_irq+0x64/0x68
__irq_svc+0x40/0x70
cpuidle_wrap_enter+0x4c/0xa0
cpuidle_enter_state+0x18/0x68
cpuidle_idle_call+0xac/0xe0
cpu_idle+0xac/0xf0
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/dma/pl330.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -281,10 +281,10 @@ static void pl330_free_chan_resources(st
struct dma_pl330_chan *pch = to_pchan(chan);
unsigned long flags;
- spin_lock_irqsave(&pch->lock, flags);
-
tasklet_kill(&pch->task);
+ spin_lock_irqsave(&pch->lock, flags);
+
pl330_release_channel(pch->pl330_chid);
pch->pl330_chid = NULL;
next prev parent reply other threads:[~2013-07-19 2:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 2:23 [ 00/18] 3.0.87-stable review Greg Kroah-Hartman
2013-07-19 2:23 ` [ 01/18] jbd2: fix theoretical race in jbd2__journal_restart Greg Kroah-Hartman
2013-07-19 2:23 ` [ 02/18] ext3,ext4: dont mess with dir_file->f_pos in htree_dirblock_to_tree() Greg Kroah-Hartman
2013-07-19 2:23 ` [ 03/18] USB: option,qcserial: move Novatel Gobi1K IDs to qcserial Greg Kroah-Hartman
2013-07-19 2:23 ` [ 04/18] usb: gadget: f_mass_storage: add missing memory barrier for thread_wakeup_needed Greg Kroah-Hartman
2013-07-19 2:23 ` [ 05/18] xhci: check for failed dma pool allocation Greg Kroah-Hartman
2013-07-19 2:23 ` [ 06/18] pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status Greg Kroah-Hartman
2013-07-19 2:23 ` [ 07/18] xen/time: remove blocked time accounting from xen "clockchip" Greg Kroah-Hartman
2013-07-19 2:23 ` [ 08/18] genirq: Fix can_request_irq() for IRQs without an action Greg Kroah-Hartman
2013-07-19 2:23 ` [ 09/18] drivers/rtc/rtc-rv3029c2.c: fix disabling AIE irq Greg Kroah-Hartman
2013-07-19 2:23 ` [ 10/18] ACPI / EC: Add HP Folio 13 to ec_dmi_table in order to skip DSDT scan Greg Kroah-Hartman
2013-07-22 16:13 ` Luis Henriques
2013-07-23 4:21 ` Ben Hutchings
2013-07-23 10:57 ` Rafael J. Wysocki
2013-07-23 10:57 ` Rafael J. Wysocki
2013-07-19 2:23 ` [ 11/18] ocfs2: xattr: fix inlined xattr reflink Greg Kroah-Hartman
2013-07-19 2:23 ` [ 12/18] ahci: Add AMD CZ SATA device ID Greg Kroah-Hartman
2013-07-19 2:23 ` [ 13/18] ahci: remove pmp link online check in FBS EH Greg Kroah-Hartman
2013-07-19 2:23 ` [ 14/18] timer: Fix jiffies wrap behavior of round_jiffies_common() Greg Kroah-Hartman
2013-07-19 2:23 ` [ 15/18] ext4: fix data offset overflow in ext4_xattr_fiemap() on 32-bit archs Greg Kroah-Hartman
2013-07-19 2:23 ` [ 16/18] ext4: fix overflow when counting used blocks on 32-bit architectures Greg Kroah-Hartman
2013-07-19 2:23 ` [ 17/18] ARM: 7765/1: perf: Record the user-mode PC in the call chain Greg Kroah-Hartman
2013-07-19 2:23 ` Greg Kroah-Hartman [this message]
2013-07-19 23:57 ` [ 00/18] 3.0.87-stable review Shuah Khan
2013-07-19 23:57 ` Shuah Khan
2013-07-21 2:02 ` Satoru Takeuchi
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=20130719021050.204528358@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=b.zolnierkie@samsung.com \
--cc=jassisinghbrar@gmail.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=t.figa@samsung.com \
--cc=torvalds@linux-foundation.org \
--cc=vinod.koul@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.