diff options
| author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2026-10-19 17:45:33 +0300 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-20 10:47:41 +0200 |
| commit | 0ade01edd33181b65393cf3864cb2ac7c5eb1487 (patch) | |
| tree | c46479773a86e5c2e925b2045eac5621e7087742 /scripts/Makefile.thinlto | |
| parent | 931f5714b7921290cd1a4742e185aeeae7270ee6 (diff) | |
| download | linux-0ade01edd33181b65393cf3864cb2ac7c5eb1487.tar.gz linux-0ade01edd33181b65393cf3864cb2ac7c5eb1487.zip | |
ALSA: compress: reject restarting an ACTIVE task via origin_seqno
snd_compr_task_start_prepare() only rejects tasks with
state >= SND_COMPRESS_TASK_STATE_FINISHED. Since the enum is
IDLE(0) < ACTIVE(1) < FINISHED(2), this accepts ACTIVE tasks and
rejects FINISHED ones, the opposite of what the origin_seqno
mechanism needs: origin_seqno is meant to let a caller reuse a
FINISHED task's buffers for a new job, not to restart a task that is
still queued with the driver.
The seqno lookup path in snd_compr_task_start() has its own explicit
"task->state != IDLE" guard, but the origin_seqno lookup path relies
solely on this function, so it can restart an ACTIVE task, causing
ops->task_start() to be called twice for the same task and
runtime->active_tasks to be incremented twice without a matching
finish/stop.
Accept IDLE and FINISHED, reject ACTIVE, on both entry paths.
Fixes: 04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20261019144533.30665-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
