linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <umgwanakikbuti@gmail.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	rostedt@goodmis.org, John Kacur <jkacur@redhat.com>
Subject: [patch-3.18.7-rt1] snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled() splats
Date: Wed, 18 Feb 2015 15:09:23 +0100	[thread overview]
Message-ID: <1424268563.7035.5.camel@gmail.com> (raw)
In-Reply-To: <20150216111822.GA21649@linutronix.de>

Locking functions previously using read_lock_irq()/read_lock_irqsave() were
changed to local_irq_disable/save(), leading to gripes.  Use nort variants.

[ 2423.966857] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915
[ 2423.966858] in_atomic(): 0, irqs_disabled(): 1, pid: 5947, name: alsa-sink-ALC88
[ 2423.966860] CPU: 5 PID: 5947 Comm: alsa-sink-ALC88 Not tainted 3.18.7-rt1 #9
[ 2423.966860] Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.404 11/06/2014
[ 2423.966862]  ffff880409316240 ffff88040866fa38 ffffffff815bdeb5 0000000000000002
[ 2423.966863]  0000000000000000 ffff88040866fa58 ffffffff81073c86 ffffffffa03b2640
[ 2423.966864]  ffff88040239ec00 ffff88040866fa78 ffffffff815c3d34 ffffffffa03b2640
[ 2423.966864] Call Trace:
[ 2423.966868]  [<ffffffff815bdeb5>] dump_stack+0x4f/0x9e
[ 2423.966870]  [<ffffffff81073c86>] __might_sleep+0xe6/0x150
[ 2423.966880]  [<ffffffff815c3d34>] __rt_spin_lock+0x24/0x50
[ 2423.966883]  [<ffffffff815c4044>] rt_read_lock+0x34/0x40
[ 2423.966887]  [<ffffffffa03a2979>] snd_pcm_stream_lock+0x29/0x70 [snd_pcm]
[ 2423.966890]  [<ffffffffa03a355d>] snd_pcm_playback_poll+0x5d/0x120 [snd_pcm]
[ 2423.966892]  [<ffffffff811937a2>] do_sys_poll+0x322/0x5b0
[ 2423.966895]  [<ffffffff812bcfe7>] ? debug_smp_processor_id+0x17/0x20
[ 2423.966897]  [<ffffffffa03fa023>] ? azx_cc_read+0x23/0x30 [snd_hda_controller]
[ 2423.966899]  [<ffffffff810b9029>] ? timecounter_read+0x19/0x50
[ 2423.966901]  [<ffffffffa03fb187>] ? azx_get_wallclock_tstamp+0x97/0xc0 [snd_hda_controller]
[ 2423.966904]  [<ffffffffa03aaed1>] ? snd_pcm_update_hw_ptr0+0x1b1/0x470 [snd_pcm]
[ 2423.966906]  [<ffffffff812bcfe7>] ? debug_smp_processor_id+0x17/0x20
[ 2423.966907]  [<ffffffff81051d2a>] ? unpin_current_cpu+0x1a/0x70
[ 2423.966910]  [<ffffffff81079ec0>] ? migrate_enable+0xe0/0x1e0
[ 2423.966912]  [<ffffffff811923c0>] ? poll_select_copy_remaining+0x130/0x130
[ 2423.966914]  [<ffffffff811923c0>] ? poll_select_copy_remaining+0x130/0x130
[ 2423.966915]  [<ffffffff811923c0>] ? poll_select_copy_remaining+0x130/0x130
[ 2423.966916]  [<ffffffff811923c0>] ? poll_select_copy_remaining+0x130/0x130
[ 2423.966919]  [<ffffffffa03a5ba2>] ? snd_pcm_common_ioctl1+0x1c2/0xda0 [snd_pcm]
[ 2423.966920]  [<ffffffff812bcfe7>] ? debug_smp_processor_id+0x17/0x20
[ 2423.966923]  [<ffffffffa03a690b>] ? snd_pcm_playback_ioctl1+0x18b/0x2d0 [snd_pcm]
[ 2423.966924]  [<ffffffff811c6fa9>] ? eventfd_ctx_read+0x179/0x1e0
[ 2423.966926]  [<ffffffffa03a6a84>] ? snd_pcm_playback_ioctl+0x34/0x40 [snd_pcm]
[ 2423.966927]  [<ffffffff810b661e>] ? ktime_get_ts64+0x4e/0xf0
[ 2423.966928]  [<ffffffff81193d48>] SyS_ppoll+0x1a8/0x1c0
[ 2423.966930]  [<ffffffff815c4556>] system_call_fastpath+0x16/0x1b

Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
---
 sound/core/pcm_native.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -104,7 +104,7 @@ EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock)
 void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
 {
 	if (!substream->pcm->nonatomic)
-		local_irq_disable();
+		local_irq_disable_nort();
 	snd_pcm_stream_lock(substream);
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_lock_irq);
@@ -113,7 +113,7 @@ void snd_pcm_stream_unlock_irq(struct sn
 {
 	snd_pcm_stream_unlock(substream);
 	if (!substream->pcm->nonatomic)
-		local_irq_enable();
+		local_irq_enable_nort();
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irq);
 
@@ -121,7 +121,7 @@ unsigned long _snd_pcm_stream_lock_irqsa
 {
 	unsigned long flags = 0;
 	if (!substream->pcm->nonatomic)
-		local_irq_save(flags);
+		local_irq_save_nort(flags);
 	snd_pcm_stream_lock(substream);
 	return flags;
 }
@@ -132,7 +132,7 @@ void snd_pcm_stream_unlock_irqrestore(st
 {
 	snd_pcm_stream_unlock(substream);
 	if (!substream->pcm->nonatomic)
-		local_irq_restore(flags);
+		local_irq_restore_nort(flags);
 }
 EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irqrestore);
 

  parent reply	other threads:[~2015-02-18 14:09 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 11:18 [ANNOUNCE] 3.18.7-rt1 Sebastian Andrzej Siewior
2015-02-16 18:13 ` Sebastian Andrzej Siewior
2015-02-16 20:12 ` Richard Cochran
2015-02-16 20:21   ` Steven Rostedt
2015-02-17  8:37 ` Daniel Wagner
2015-02-19  9:36   ` Joakim Hernberg
2015-02-25 13:55     ` Sebastian Andrzej Siewior
2015-02-26  8:48       ` Sebastian Andrzej Siewior
2015-02-27  6:40         ` Daniel Wagner
2015-02-27  7:58           ` Sebastian Andrzej Siewior
2015-02-18 11:21 ` [patch-3.18.7-rt1] sched/context-tracking: fix PREEMPT_LAZY explosions Mike Galbraith
2015-02-18 11:27   ` [rfc patch-3.18.7-rt1] rt/nohz_full: Fix can_stop_full_tick() gripe within softirq Mike Galbraith
2015-02-19  4:50     ` Mike Galbraith
2015-02-19  6:30   ` [patch-3.18.7-rt1] sched/context-tracking: fix PREEMPT_LAZY explosions Mike Galbraith
2015-03-09 13:45   ` Sebastian Andrzej Siewior
2015-03-09 14:36     ` Mike Galbraith
2015-03-09 14:45       ` Sebastian Andrzej Siewior
2015-03-10  9:35       ` Mike Galbraith
2015-03-11  6:18         ` Mike Galbraith
2015-03-12  9:38         ` [rfc patch] rt,nohz_full: fix nohz_full for PREEMPT_RT_FULL Mike Galbraith
2015-03-12 15:09           ` Steven Rostedt
2015-03-13  2:13             ` Mike Galbraith
2015-03-13  3:03               ` Steven Rostedt
2015-03-13  4:53           ` [rfc patch v2] " Mike Galbraith
2015-03-16 20:24             ` Sebastian Andrzej Siewior
2015-03-17  1:53               ` Mike Galbraith
2015-03-17  4:45                 ` Mike Galbraith
2015-04-10 14:15             ` Sebastian Andrzej Siewior
2015-04-10 14:24               ` Mike Galbraith
2015-04-10 14:28               ` Mike Galbraith
2015-04-11 13:15               ` Mike Galbraith
2015-04-11 13:36                 ` Mike Galbraith
2015-04-11 14:22                   ` Mike Galbraith
2015-04-13  9:43                   ` Sebastian Andrzej Siewior
2015-04-13  9:41                 ` Sebastian Andrzej Siewior
2015-02-18 14:09 ` Mike Galbraith [this message]
2015-02-25 14:08   ` [patch-3.18.7-rt1] snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled() splats Sebastian Andrzej Siewior
2015-02-18 15:05 ` [patch-3.18.7-rt1]sunrpc: make svc_xprt_do_enqueue() use get_cpu_light() Mike Galbraith
2015-02-25 14:14   ` Sebastian Andrzej Siewior

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=1424268563.7035.5.camel@gmail.com \
    --to=umgwanakikbuti@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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).