From: Takashi Iwai Date: Fri, 24 Mar 2017 16:07:57 +0000 (+0100) Subject: ALSA: seq: Fix race during FIFO resize X-Git-Tag: v3.2.91~51 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df7a2d0af9f7ab73cf22a7b62bbc0bad93a02110;p=pandora-kernel.git ALSA: seq: Fix race during FIFO resize commit 2d7d54002e396c180db0c800c1046f0a3c471597 upstream. When a new event is queued while processing to resize the FIFO in snd_seq_fifo_clear(), it may lead to a use-after-free, as the old pool that is being queued gets removed. For avoiding this race, we need to close the pool to be deleted and sync its usage before actually deleting it. The issue was spotted by syzkaller. Reported-by: Dmitry Vyukov Signed-off-by: Takashi Iwai Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed