linux/sound/hda
Takashi Iwai 3194ed4979 ALSA: hda - Fix possible race on regmap bypass flip
HD-audio driver uses regmap cache bypass feature for reading a raw
value without the cache.  But this is racy since both the cached and
the uncached reads may occur concurrently.  The former is done via the
normal control API access while the latter comes from the proc file
read.

Even though the regmap itself has the protection against the
concurrent accesses, the flag set/reset is done without the
protection, so it may lead to inconsistent state of bypass flag that
doesn't match with the current read and occasionally result in a
kernel WARNING like:
  WARNING: CPU: 3 PID: 2731 at drivers/base/regmap/regcache.c:499 regcache_cache_only+0x78/0x93

One way to work around such a problem is to wrap with a mutex.  But in
this case, the solution is simpler: for the uncached read, we just
skip the regmap and directly calls its accessor.  The verb execution
there is protected by itself, so basically it's safe to call
individually.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-04-21 17:59:17 +02:00
..
ext ALSA: hdac: add snd_hdac_ext_bus_link_power_up_all 2016-01-10 12:02:47 +00:00
array.c ALSA: hda - Move generic array helpers to core lib 2015-03-23 13:19:35 +01:00
hda_bus_type.c ALSA: hda - Advertise MODALIAS in uevent 2015-10-20 10:15:53 +02:00
hdac_bus.c ALSA: hda - Add / fix kernel doc comments 2015-10-28 12:37:29 +01:00
hdac_controller.c ALSA: hda - Loop interrupt handling until really cleared 2016-02-26 08:50:31 +01:00
hdac_device.c ALSA: hda - Fix possible race on regmap bypass flip 2016-04-21 17:59:17 +02:00
hdac_i915.c ALSA: hda - Bind with i915 only when Intel graphics is present 2016-04-04 11:46:17 +02:00
hdac_regmap.c ALSA: hda - Fix possible race on regmap bypass flip 2016-04-21 17:59:17 +02:00
hdac_stream.c ALSA: hda - Add / fix kernel doc comments 2015-10-28 12:37:29 +01:00
hdac_sysfs.c ALSA: hda - Add hdaudio bus modalias support 2015-10-20 10:15:09 +02:00
hdmi_chmap.c ALSA: hda - Use snd_hdac namespace prefix for chmap exported APIs 2016-03-07 15:46:06 +01:00
Kconfig ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core 2015-06-16 17:40:38 +02:00
local.h ALSA: hda - Add widget sysfs tree 2015-03-23 13:17:27 +01:00
Makefile ALSA: hda - Add hdmi chmap verb programming ops to chmap object 2016-03-07 15:41:31 +01:00
trace.c ALSA: hda - Re-add tracepoints to HD-audio core driver 2015-03-23 13:17:58 +01:00
trace.h ALSA: hda - add hdac stream trace 2015-05-18 10:06:20 +02:00