]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/blob - rt-patches/0184-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
WAR:media:i2c:ov5693: add flip and mirror setting
[hercules2020/nv-tegra/linux-4.4.git] / rt-patches / 0184-snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch
1 From 0e93a715352c2777fabdda5b785933501ca70863 Mon Sep 17 00:00:00 2001
2 From: Mike Galbraith <umgwanakikbuti@gmail.com>
3 Date: Wed, 18 Feb 2015 15:09:23 +0100
4 Subject: [PATCH 184/365] snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled()
5  splats
6
7 Locking functions previously using read_lock_irq()/read_lock_irqsave() were
8 changed to local_irq_disable/save(), leading to gripes.  Use nort variants.
9
10 |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915
11 |in_atomic(): 0, irqs_disabled(): 1, pid: 5947, name: alsa-sink-ALC88
12 |CPU: 5 PID: 5947 Comm: alsa-sink-ALC88 Not tainted 3.18.7-rt1 #9
13 |Hardware name: MEDION MS-7848/MS-7848, BIOS M7848W08.404 11/06/2014
14 | ffff880409316240 ffff88040866fa38 ffffffff815bdeb5 0000000000000002
15 | 0000000000000000 ffff88040866fa58 ffffffff81073c86 ffffffffa03b2640
16 | ffff88040239ec00 ffff88040866fa78 ffffffff815c3d34 ffffffffa03b2640
17 |Call Trace:
18 | [<ffffffff815bdeb5>] dump_stack+0x4f/0x9e
19 | [<ffffffff81073c86>] __might_sleep+0xe6/0x150
20 | [<ffffffff815c3d34>] __rt_spin_lock+0x24/0x50
21 | [<ffffffff815c4044>] rt_read_lock+0x34/0x40
22 | [<ffffffffa03a2979>] snd_pcm_stream_lock+0x29/0x70 [snd_pcm]
23 | [<ffffffffa03a355d>] snd_pcm_playback_poll+0x5d/0x120 [snd_pcm]
24 | [<ffffffff811937a2>] do_sys_poll+0x322/0x5b0
25 | [<ffffffff81193d48>] SyS_ppoll+0x1a8/0x1c0
26 | [<ffffffff815c4556>] system_call_fastpath+0x16/0x1b
27
28 Signed-off-by: Mike Galbraith <umgwanakikbuti@gmail.com>
29 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
30 ---
31  sound/core/pcm_native.c | 8 ++++----
32  1 file changed, 4 insertions(+), 4 deletions(-)
33
34 diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
35 index 4ba64fd..34e5018 100644
36 --- a/sound/core/pcm_native.c
37 +++ b/sound/core/pcm_native.c
38 @@ -135,7 +135,7 @@ EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock);
39  void snd_pcm_stream_lock_irq(struct snd_pcm_substream *substream)
40  {
41         if (!substream->pcm->nonatomic)
42 -               local_irq_disable();
43 +               local_irq_disable_nort();
44         snd_pcm_stream_lock(substream);
45  }
46  EXPORT_SYMBOL_GPL(snd_pcm_stream_lock_irq);
47 @@ -150,7 +150,7 @@ void snd_pcm_stream_unlock_irq(struct snd_pcm_substream *substream)
48  {
49         snd_pcm_stream_unlock(substream);
50         if (!substream->pcm->nonatomic)
51 -               local_irq_enable();
52 +               local_irq_enable_nort();
53  }
54  EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irq);
55  
56 @@ -158,7 +158,7 @@ unsigned long _snd_pcm_stream_lock_irqsave(struct snd_pcm_substream *substream)
57  {
58         unsigned long flags = 0;
59         if (!substream->pcm->nonatomic)
60 -               local_irq_save(flags);
61 +               local_irq_save_nort(flags);
62         snd_pcm_stream_lock(substream);
63         return flags;
64  }
65 @@ -176,7 +176,7 @@ void snd_pcm_stream_unlock_irqrestore(struct snd_pcm_substream *substream,
66  {
67         snd_pcm_stream_unlock(substream);
68         if (!substream->pcm->nonatomic)
69 -               local_irq_restore(flags);
70 +               local_irq_restore_nort(flags);
71  }
72  EXPORT_SYMBOL_GPL(snd_pcm_stream_unlock_irqrestore);
73  
74 -- 
75 2.7.4
76