linux_dsm_epyc7002/sound/core
Takashi Iwai f4fa968950 ALSA: core: Don't refer to snd_cards array directly
The snd_cards[] array holds the card pointers that have been currently
registered, and it's exported for the external modules that may need
to refer a card object.  But accessing to this array can be racy
against the driver probe or removal, as the card registration or free
may happen concurrently.

This patch gets rid of the direct access to snd_cards[] array and
provides a helper function to give the card object from the index
number with a refcount management.  Then the caller can access to the
given card object safely, and releases it via snd_card_unref().

While we're at it, add a proper comment to snd_card_unref() and make
it an inlined function for type-safety, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-04-17 07:16:15 +02:00
..
oss ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
seq ALSA: seq: Correct unlock sequence at snd_seq_client_ioctl_unlock() 2019-04-15 12:04:31 +02:00
compress_offload.c ALSA: compress: Remove superfluous snd_info_register() calls 2019-02-06 18:11:54 +01:00
control_compat.c
control.c
ctljack.c
device.c
hrtimer.c
hwdep_compat.c
hwdep.c
info_oss.c
info.c ALSA: info: Move card id proc creation into info.c 2019-02-06 18:11:58 +01:00
init.c ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
isadma.c
jack.c
Kconfig
Makefile
memalloc.c ALSA: Replace snd_malloc_pages() and snd_free_pages() with standard helpers, take#2 2019-03-27 17:15:01 +01:00
memory.c
misc.c
pcm_compat.c
pcm_dmaengine.c
pcm_drm_eld.c
pcm_iec958.c
pcm_lib.c ALSA: pcm: Comment why read blocks when PCM is not running 2019-02-13 08:01:05 +01:00
pcm_local.h ALSA: pcm: Unify snd_pcm_group initialization 2019-01-21 16:39:35 +01:00
pcm_memory.c ALSA: pcm: Define snd_pcm_lib_preallocate_*() as returning void 2019-02-08 14:24:12 +01:00
pcm_misc.c
pcm_native.c ALSA: pcm: Don't suspend stream in unrecoverable PCM state 2019-03-25 16:36:30 +01:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h
pcm.c ALSA: Replace snd_malloc_pages() and snd_free_pages() with standard helpers, take#2 2019-03-27 17:15:01 +01:00
rawmidi_compat.c
rawmidi.c ALSA: rawmidi: Fix potential Spectre v1 vulnerability 2019-03-21 13:21:15 +01:00
seq_device.c
sgbuf.c
sound_oss.c
sound.c ALSA: core: Don't refer to snd_cards array directly 2019-04-17 07:16:15 +02:00
timer_compat.c
timer.c ALSA: timer: Coding style fixes 2019-04-10 08:42:26 +02:00
vmaster.c