From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2B6EC6778D for ; Tue, 11 Sep 2018 06:06:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5FD9F20865 for ; Tue, 11 Sep 2018 06:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5FD9F20865 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727231AbeIKLEb (ORCPT ); Tue, 11 Sep 2018 07:04:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:59326 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726475AbeIKLEb (ORCPT ); Tue, 11 Sep 2018 07:04:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E645FAEA7; Tue, 11 Sep 2018 06:06:49 +0000 (UTC) Date: Tue, 11 Sep 2018 08:06:49 +0200 Message-ID: From: Takashi Iwai To: "Yu Zhao" Cc: "Mark Brown" , , "Rakesh Ughreja" , "Vinod Koul" , "Jaroslav Kysela" , Subject: Re: [PATCH 2/3] sound: enable interrupt after dma buffer initialization In-Reply-To: <20180910212150.202655-1-yuzhao@google.com> References: <20180910211718.200802-1-yuzhao@google.com> <20180910212150.202655-1-yuzhao@google.com> 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/26 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 10 Sep 2018 23:21:50 +0200, Yu Zhao wrote: > > In snd_hdac_bus_init_chip(), we enable interrupt before > snd_hdac_bus_init_cmd_io() initializing dma buffers. If irq has > been acquired and irq handler uses the dma buffer, kernel may crash > when interrupt comes in. > > Fix the problem by postponing enabling irq after dma buffer > initialization. And warn once on null dma buffer pointer during the > initialization. > > Signed-off-by: Yu Zhao Looks good to me. Reviewed-by: Takashi Iwai BTW, the reason why this hasn't been hit on the legacy HD-audio driver is that we allocate usually with MSI, so the irq is isolated. Any reason that Intel SKL driver doesn't use MST? thanks, Takashi