OpenCloudOS-Kernel/include
Curtis Malainey 09ac6a817b
ASoC: soc-core: fix init platform memory handling
snd_soc_init_platform initializes pointers to snd_soc_dai_link which is
statically allocated and it does this by devm_kzalloc. In the event of
an EPROBE_DEFER the memory will be freed and the pointers are left
dangling. snd_soc_init_platform sees the dangling pointers and assumes
they are pointing to initialized memory and does not reallocate them on
the second probe attempt which results in a use after free bug since
devm has freed the memory from the first probe attempt.

Since the intention for snd_soc_dai_link->platform is that it can be set
statically by the machine driver we need to respect the pointer in the
event we did not set it but still catch dangling pointers. The solution
is to add a flag to track whether the pointer was dynamically allocated
or not.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-14 22:48:16 +00:00
..
acpi pci-v4.20-changes 2018-10-25 06:50:48 -07:00
asm-generic mm: introduce common STRUCT_PAGE_MAX_SHIFT define 2018-12-14 15:05:45 -08:00
clocksource
crypto KEYS: asym_tpm: extract key size & public key [ver #2] 2018-10-26 09:30:46 +01:00
drm drm, i915, amdgpu, bridge + core quirk 2018-11-02 10:58:20 -07:00
dt-bindings ASoC: qdsp6: dt-bindings: Add q6afe display_port dt binding 2018-12-14 12:48:48 +00:00
keys KEYS: Move trusted.h to include/keys [ver #2] 2018-10-26 09:30:47 +01:00
kvm
linux Merge branch 'asoc-4.21' into asoc-next 2018-12-18 12:23:59 +00:00
math-emu
media media: mpeg2-ctrls.h: move MPEG2 state controls to non-public header 2018-12-05 13:06:31 -05:00
memory
misc
net neighbour: Avoid writing before skb->head in neigh_hh_output() 2018-12-07 16:24:40 -08:00
pcmcia
ras
rdma First merge window pull request 2018-10-26 07:38:19 -07:00
scsi
soc ARM: SoC driver updates for 4.17 2018-10-29 15:16:01 -07:00
sound ASoC: soc-core: fix init platform memory handling 2019-01-14 22:48:16 +00:00
target scsi: target/core: Remove the SCF_COMPARE_AND_WRITE_POST flag 2018-10-16 01:13:35 -04:00
trace While rewriting the function graph tracer, I discovered a design flaw that 2018-11-30 09:32:34 -08:00
uapi media fixes for v4.20-rc7 2018-12-12 18:24:32 -08:00
video udlfb: handle unplug properly 2018-10-08 12:57:34 +02:00
xen Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-11-29 17:53:31 +01:00