]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Mar 2018 12:32:23 +0000 (14:32 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 Mar 2018 14:20:02 +0000 (16:20 +0200)
commit869d2fdb8c9a014d2e1dfb0c1c41d398d9a48162
treea270d39499d36075969c0a709a1a00a0d8d9d966
parent0e1d91d45e36bed372e54e2dbb3cf21fe0ad74d4
ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls

The previous fix a5b67c85a16f ("ALSA: pcm: Return -EBUSY for OSS
ioctls changing busy streams") introduced some mutex unbalance; the
check of runtime->oss.rw_ref was inserted in a wrong place after the
mutex lock.

This patch fixes the inconsistency by rewriting with the helper
functions to lock/unlock parameters with the stream check.

Fixes: a5b67c85a16f ("ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c