stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Alex Levin <levinale@chromium.org>,
	Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.1 43/96] ASoC: Intel: sst: fix kmalloc call with wrong flags
Date: Mon,  8 Jul 2019 17:13:15 +0200	[thread overview]
Message-ID: <20190708150528.867462871@linuxfoundation.org> (raw)
In-Reply-To: <20190708150526.234572443@linuxfoundation.org>

[ Upstream commit 3da428ff2aa5a5191ba2f1630eea75f03242f3f2 ]

When calling kmalloc with GFP_KERNEL in case CONFIG_SLOB is unset,
kmem_cache_alloc_trace is called.

In case CONFIG_TRACING is set, kmem_cache_alloc_trace will ball
slab_alloc, which will call slab_pre_alloc_hook which might_sleep_if.

The context in which it is called in this case, the
intel_sst_interrupt_mrfld, calling a sleeping kmalloc generates a BUG():

Fixes: 972b0d456e64 ("ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL")

[   20.250671] BUG: sleeping function called from invalid context at mm/slab.h:422
[   20.250683] in_atomic(): 1, irqs_disabled(): 1, pid: 1791, name: Chrome_IOThread
[   20.250690] CPU: 0 PID: 1791 Comm: Chrome_IOThread Tainted: G        W         4.19.43 #61
[   20.250693] Hardware name: GOOGLE Kefka, BIOS Google_Kefka.7287.337.0 03/02/2017
[   20.250697] Call Trace:
[   20.250704]  <IRQ>
[   20.250716]  dump_stack+0x7e/0xc3
[   20.250725]  ___might_sleep+0x12a/0x140
[   20.250731]  kmem_cache_alloc_trace+0x53/0x1c5
[   20.250736]  ? update_cfs_rq_load_avg+0x17e/0x1aa
[   20.250740]  ? cpu_load_update+0x6c/0xc2
[   20.250746]  sst_create_ipc_msg+0x2d/0x88
[   20.250752]  intel_sst_interrupt_mrfld+0x12a/0x22c
[   20.250758]  __handle_irq_event_percpu+0x133/0x228
[   20.250764]  handle_irq_event_percpu+0x35/0x7a
[   20.250768]  handle_irq_event+0x36/0x55
[   20.250773]  handle_fasteoi_irq+0xab/0x16c
[   20.250779]  handle_irq+0xd9/0x11e
[   20.250785]  do_IRQ+0x54/0xe0
[   20.250791]  common_interrupt+0xf/0xf
[   20.250795]  </IRQ>
[   20.250800] RIP: 0010:__lru_cache_add+0x4e/0xad
[   20.250806] Code: 00 01 48 c7 c7 b8 df 01 00 65 48 03 3c 25 28 f1 00 00 48 8b 48 08 48 89 ca 48 ff ca f6 c1 01 48 0f 44 d0 f0 ff 42 34 0f b6 0f <89> ca fe c2 88 17 48 89 44 cf 08 80 fa 0f 74 0e 48 8b 08 66 85 c9
[   20.250809] RSP: 0000:ffffa568810bfd98 EFLAGS: 00000202 ORIG_RAX: ffffffffffffffd6
[   20.250814] RAX: ffffd3b904eb1940 RBX: ffffd3b904eb1940 RCX: 0000000000000004
[   20.250817] RDX: ffffd3b904eb1940 RSI: ffffa10ee5c47450 RDI: ffffa10efba1dfb8
[   20.250821] RBP: ffffa568810bfda8 R08: ffffa10ef9c741c1 R09: dead000000000100
[   20.250824] R10: 0000000000000000 R11: 0000000000000000 R12: ffffa10ee8d52a40
[   20.250827] R13: ffffa10ee8d52000 R14: ffffa10ee5c47450 R15: 800000013ac65067
[   20.250835]  lru_cache_add_active_or_unevictable+0x4e/0xb8
[   20.250841]  handle_mm_fault+0xd98/0x10c4
[   20.250848]  __do_page_fault+0x235/0x42d
[   20.250853]  ? page_fault+0x8/0x30
[   20.250858]  do_page_fault+0x3d/0x17a
[   20.250862]  ? page_fault+0x8/0x30
[   20.250866]  page_fault+0x1e/0x30
[   20.250872] RIP: 0033:0x7962fdea9304
[   20.250875] Code: 0f 11 4c 17 f0 c3 48 3b 15 f1 26 31 00 0f 83 e2 00 00 00 48 39 f7 72 0f 74 12 4c 8d 0c 16 4c 39 cf 0f 82 63 01 00 00 48 89 d1 <f3> a4 c3 80 fa 08 73 12 80 fa 04 73 1e 80 fa 01 77 26 72 05 0f b6
[   20.250879] RSP: 002b:00007962f4db5468 EFLAGS: 00010206
[   20.250883] RAX: 00003c8cc9d47008 RBX: 0000000000000000 RCX: 0000000000001b48
[   20.250886] RDX: 0000000000002b40 RSI: 00003c8cc9551000 RDI: 00003c8cc9d48000
[   20.250890] RBP: 00007962f4db5820 R08: 0000000000000000 R09: 00003c8cc9552b48
[   20.250893] R10: 0000562dd1064d30 R11: 00003c8cc825b908 R12: 00003c8cc966d3c0
[   20.250896] R13: 00003c8cc9e280c0 R14: 0000000000000000 R15: 0000000000000000

Signed-off-by: Alex Levin <levinale@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/soc/intel/atom/sst/sst_pvt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/atom/sst/sst_pvt.c b/sound/soc/intel/atom/sst/sst_pvt.c
index 00a37a09dc9b..dba0ca07ebf9 100644
--- a/sound/soc/intel/atom/sst/sst_pvt.c
+++ b/sound/soc/intel/atom/sst/sst_pvt.c
@@ -166,11 +166,11 @@ int sst_create_ipc_msg(struct ipc_post **arg, bool large)
 {
 	struct ipc_post *msg;
 
-	msg = kzalloc(sizeof(*msg), GFP_KERNEL);
+	msg = kzalloc(sizeof(*msg), GFP_ATOMIC);
 	if (!msg)
 		return -ENOMEM;
 	if (large) {
-		msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_KERNEL);
+		msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_ATOMIC);
 		if (!msg->mailbox_data) {
 			kfree(msg);
 			return -ENOMEM;
-- 
2.20.1




  parent reply	other threads:[~2019-07-08 15:32 UTC|newest]

Thread overview: 113+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 15:12 [PATCH 5.1 00/96] 5.1.17-stable review Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 01/96] Bluetooth: Fix faulty expression for minimum encryption key size check Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 02/96] signal: remove the wrong signal_pending() check in restore_user_sigmask() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 03/96] netfilter: nf_flow_table: ignore DF bit setting Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 04/96] netfilter: nft_flow_offload: set liberal tracking mode for tcp Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 05/96] netfilter: nft_flow_offload: dont offload when sequence numbers need adjustment Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 06/96] netfilter: nft_flow_offload: IPCB is only valid for ipv4 family Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 07/96] idr: Fix idr_get_next race with idr_remove Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 08/96] HID: i2c-hid: add iBall Aer3 to descriptor override Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 09/96] ASoC : cs4265 : readable register too low Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 10/96] ASoC: ak4458: add return value for ak4458_probe Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 11/96] ASoC: soc-pcm: BE dai needs prepare when pause release after resume Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 12/96] ASoC: ak4458: rstn_control - return a non-zero on error only Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 13/96] spi: bitbang: Fix NULL pointer dereference in spi_unregister_master Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 14/96] ASoC: core: lock client_mutex while removing link components Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 15/96] iommu/vt-d: Set the right field for Page Walk Snoop Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 16/96] HID: a4tech: fix horizontal scrolling Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 17/96] ASoC: Intel: Baytrail: add quirk for Aegex 10 (RU2) tablet Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 18/96] ASoC: hda: fix unbalanced codec dev refcount for HDA_DEV_ASOC Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 19/96] drm/mediatek: fix unbind functions Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 20/96] drm/mediatek: unbind components in mtk_drm_unbind() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 21/96] drm/mediatek: call drm_atomic_helper_shutdown() when unbinding driver Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 22/96] drm/mediatek: clear num_pipes when unbind driver Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 23/96] drm/mediatek: call mtk_dsi_stop() after mtk_drm_crtc_atomic_disable() Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 24/96] ASoC: max98090: remove 24-bit format support if RJ is 0 Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 25/96] ASoC: sun4i-i2s: Fix sun8i tx channel offset mask Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 26/96] ASoC: sun4i-i2s: Add offset to RX channel select Greg Kroah-Hartman
2019-07-08 15:12 ` [PATCH 5.1 27/96] x86/CPU: Add more Icelake model numbers Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 28/96] usb: gadget: fusb300_udc: Fix memory leak of fusb300->ep[i] Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 29/96] usb: gadget: udc: lpc32xx: allocate descriptor with GFP_ATOMIC Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 30/96] usb: gadget: dwc2: fix zlp handling Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 31/96] ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 32/96] ASoC: Intel: bytcht_es8316: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 33/96] ASoC: Intel: cht_bsw_nau8824: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 34/96] ASoC: Intel: cht_bsw_rt5672: " Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 35/96] ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 36/96] ALSA: hdac: fix memory release for SST and SOF drivers Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 37/96] SoC: rt274: Fix internal jack assignment in set_jack callback Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 38/96] scsi: hpsa: correct ioaccel2 chaining Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 39/96] gpio: pca953x: hack to fix 24 bit gpio expanders Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 40/96] drm: panel-orientation-quirks: Add quirk for GPD pocket2 Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 41/96] drm: panel-orientation-quirks: Add quirk for GPD MicroPC Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 42/96] ASoC: core: Fix deadlock in snd_soc_instantiate_card() Greg Kroah-Hartman
2019-07-08 15:13 ` Greg Kroah-Hartman [this message]
2019-07-08 15:13 ` [PATCH 5.1 44/96] platform/x86: asus-wmi: Only Tell EC the OS will handle display hotkeys from asus_nb_wmi Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 45/96] platform/x86: intel-vbtn: Report switch events when event wakes device Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 46/96] platform/x86: mlx-platform: Fix parent device in i2c-mux-reg device registration Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 47/96] platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 48/96] i2c: pca-platform: Fix GPIO lookup code Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 49/96] arm64: tlbflush: Ensure start/end of address range are aligned to stride Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 50/96] cpuset: restore sanity to cpuset_cpus_allowed_fallback() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 51/96] scripts/decode_stacktrace.sh: prefix addr2line with $CROSS_COMPILE Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 52/96] mm/mlock.c: change count_mm_mlocked_page_nr return type Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 53/96] tracing: avoid build warning with HAVE_NOP_MCOUNT Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 54/96] module: Fix livepatch/ftrace module text permissions race Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 55/96] ftrace: Fix NULL pointer dereference in free_ftrace_func_mapper() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 56/96] ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 57/96] crypto: user - prevent operating on larval algorithms Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 58/96] crypto: cryptd - Fix skcipher instance memory leak Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 59/96] ALSA: seq: fix incorrect order of dest_client/dest_ports arguments Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 60/96] ALSA: firewire-lib/fireworks: fix miss detection of received MIDI messages Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 61/96] ALSA: line6: Fix write on zero-sized buffer Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 62/96] ALSA: usb-audio: fix sign unintended sign extension on left shifts Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 63/96] ALSA: hda/realtek: Add quirks for several Clevo notebook barebones Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 64/96] ALSA: hda/realtek - Change front mic location for Lenovo M710q Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 65/96] dax: Fix xarray entry association for mixed mappings Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 66/96] lib/mpi: Fix karactx leak in mpi_powm Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 67/96] fs/userfaultfd.c: disable irqs for fault_pending and event locks Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 68/96] swap_readpage(): avoid blk_wake_io_task() if !synchronous Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 69/96] tracing/snapshot: Resize spare buffer if size changed Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 70/96] ARM: dts: armada-xp-98dx3236: Switch to armada-38x-uart serial node Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 71/96] arm64: kaslr: keep modules inside module region when KASAN is enabled Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 72/96] drm/i915/ringbuffer: EMIT_INVALIDATE *before* switch context Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 73/96] drm/amd/powerplay: use hardware fan control if no powerplay fan table Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 74/96] drm/amdgpu: Dont skip display settings in hwmgr_resume() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 75/96] drm/amdgpu/gfx9: use reset default for PA_SC_FIFO_SIZE Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 76/96] drm/virtio: move drm_connector_update_edid_property() call Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 77/96] drm/etnaviv: add missing failure path to destroy suballoc Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 78/96] drm/imx: notify drm core before sending event during crtc disable Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 79/96] drm/imx: only send event on crtc disable if kept disabled Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 80/96] ftrace/x86: Remove possible deadlock between register_kprobe() and ftrace_run_update_code() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 81/96] mm/vmscan.c: prevent useless kswapd loops Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 82/96] btrfs: Ensure replaced device doesnt have pending chunk allocation Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 83/96] tty: rocket: fix incorrect forward declaration of rp_init() Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 84/96] s390/mm: fix pxd_bad with folded page tables Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 85/96] KVM: x86: degrade WARN to pr_warn_ratelimited Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 86/96] KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC Greg Kroah-Hartman
2019-07-08 15:13 ` [PATCH 5.1 87/96] nfsd: Fix overflow causing non-working mounts on 1 TB machines Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 88/96] svcrdma: Ignore source port when computing DRC hash Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 89/96] MIPS: Fix bounds check virt_addr_valid Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 90/96] MIPS: Add missing EHB in mtc0 -> mfc0 sequence Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 91/96] MIPS: have "plain" make calls build dtbs for selected platforms Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 92/96] dmaengine: qcom: bam_dma: Fix completed descriptors count Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 93/96] dmaengine: imx-sdma: remove BD_INTR for channel0 Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 94/96] dmaengine: jz4780: Fix an endian bug in IRQ handler Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 95/96] fs: VALIDATE_FS_PARSER should default to n Greg Kroah-Hartman
2019-07-08 15:14 ` [PATCH 5.1 96/96] scsi: target/iblock: Fix overrun in WRITE SAME emulation Greg Kroah-Hartman
2019-07-08 17:09 ` [PATCH 5.1 00/96] 5.1.17-stable review Jiunn Chang
2019-07-08 17:49 ` Phong Tran
2019-07-10  7:50   ` Greg Kroah-Hartman
2019-07-08 19:12 ` kernelci.org bot
2019-07-08 19:29 ` Luke Nowakowski-Krijger
2019-07-10  7:49   ` Greg Kroah-Hartman
2019-07-09  0:52 ` shuah
2019-07-09  6:56   ` Greg Kroah-Hartman
2019-07-09  4:43 ` Naresh Kamboju
2019-07-09  6:56   ` Greg Kroah-Hartman
2019-07-09 13:12 ` Amol Surati
2019-07-10  7:50   ` Greg Kroah-Hartman
2019-07-09 18:41 ` Guenter Roeck
2019-07-09 19:54   ` Greg Kroah-Hartman
2019-07-10  6:14 ` Jon Hunter
2019-07-10  7:24   ` Greg Kroah-Hartman

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=20190708150528.867462871@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=broonie@kernel.org \
    --cc=levinale@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.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).