From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757555AbcAOLAN (ORCPT ); Fri, 15 Jan 2016 06:00:13 -0500 Received: from mx2.suse.de ([195.135.220.15]:59102 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756906AbcAOLAI (ORCPT ); Fri, 15 Jan 2016 06:00:08 -0500 Date: Fri, 15 Jan 2016 12:00:05 +0100 Message-ID: From: Takashi Iwai To: Dmitry Vyukov Cc: alsa-devel@alsa-project.org, Jie Yang , Mark Brown , Jaroslav Kysela , LKML , Eric Dumazet , Alexander Potapenko , Kostya Serebryany , syzkaller , Sasha Levin Subject: Re: sound: use-after-free in snd_timer_interrupt In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Jan 2016 09:06:10 +0100, Dmitry Vyukov wrote: > > On Thu, Jan 14, 2016 at 5:09 PM, Takashi Iwai wrote: > > On Wed, 13 Jan 2016 21:54:10 +0100, > > Takashi Iwai wrote: > >> > >> OK, then this might be a possible race at the current snd_timer_stop() > >> implementation. There is no sync action there, so the ISR might be > >> still alive after snd_timer_close() call. Or might be another race. > >> This pattern looks a bit different, as it's involved with hrtimer. > >> > >> I'll take a look at it tomorrow. > > > > I've audited the code today, but the open window doesn't look like > > what I expected. I found only some possible cases with slave timer > > instances. > > > > In anyway, below is a test fix patch. Since I couldn't reproduce the > > issue on my local machines, it's hard to say whether this covers the > > holes you fell. Let's see... > > > Hi Takashi, > > I would be interested to understand why other people can't reproduce > issues that I hit pretty reliably. > I suspect that it can be due to .config. Please try with the following > config values. I guess rather other config, e.g. the kernel debug options. I suppose you enabled KASAN and DEBUG_LIST. What else? > I also start qemu with "-soundhw all" arg. OK, so you're testing with VM? This makes easier to recheck. Takashi