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=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY 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 61A29C433B4 for ; Sun, 16 May 2021 08:31:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 27ED361177 for ; Sun, 16 May 2021 08:31:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbhEPIcS (ORCPT ); Sun, 16 May 2021 04:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230248AbhEPIcR (ORCPT ); Sun, 16 May 2021 04:32:17 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57E0CC061573 for ; Sun, 16 May 2021 01:31:03 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id l70so2602942pga.1 for ; Sun, 16 May 2021 01:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kpe9vtoQX82iVpEE/u5ousHl/Rp3lITdfSymEOwo3JM=; b=iXKRG4CT+6rGBrHjnLZ8o7QPoZkvq3uqDfOfP3kWL13zRY9wSJ7uW0AIcAydYLN8sM gvrxHC9RuOy1OU23LGAQy+CTfugV/dIxehHZOzE5RaRf+NF44/9ja0sMkrIsQV9Ctuk3 9c/EARrz3ayNbGDksBWs7UXpw4hXPQ6WqkzKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kpe9vtoQX82iVpEE/u5ousHl/Rp3lITdfSymEOwo3JM=; b=dadXoJFIyTYe/jTRk5KWpkRZcNBWzJSOgWVwQKYN/d7L1iXzGjRkHrtJPq152SlSgi m7HK9J3nMuPJIkG7c0SvCICPYwBGdhvAlurKzXjpV5Nk2ulMSfWKvn0KdZ/Uc1jHsZUo OWs4/L2e/EzlZQ/wYoiTX+l5a66l+TmnlxbMXVKTwhpaYlddkY32/9/x2WTAqaDpeIk6 Wo+9g4oZdPfb6ebu18eqoOfqNgOoTk4zWRUr8UnmggwmqdO0EbvLusDCxAdjQT02AoPM OlABJd2/fVX+DjejCLNspDZaZJhh83LwXNWcm/27sFhNbmZkrXP752Nc6M4NBDdgYR0j YIvQ== X-Gm-Message-State: AOAM531tgsMLBMmgMuEAdHrcPA0cp167xoDnLfa1q2KcimQGlMA1vp6i jz0pf27slSYcU0lRxymmGGEPQYH0MT5ZjA== X-Google-Smtp-Source: ABdhPJwLDDhgviSBNY7z/RfSjXkpjVVCR629Bd8qWCqCppmwG9HN35CkI6iLOCJ66JIlYATFLFGuNg== X-Received: by 2002:a63:5456:: with SMTP id e22mr48817378pgm.15.1621153862982; Sun, 16 May 2021 01:31:02 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:4596:acad:c782:2f52]) by smtp.gmail.com with ESMTPSA id x27sm7717276pfo.216.2021.05.16.01.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 01:31:02 -0700 (PDT) Date: Sun, 16 May 2021 17:30:57 +0900 From: Sergey Senozhatsky To: Takashi Iwai Cc: Jaroslav Kysela , Takashi Iwai , "Gustavo A. R. Silva" , Leon Romanovsky , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: ALSA: intel8x0: div by zero in snd_intel8x0_update() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/05/14 20:16), Sergey Senozhatsky wrote: > > --- a/sound/pci/intel8x0.c > > +++ b/sound/pci/intel8x0.c > > @@ -691,6 +691,9 @@ static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ich > > int status, civ, i, step; > > int ack = 0; > > > > + if (!ichdev->substream || ichdev->suspended) > > + return; > > + > > spin_lock_irqsave(&chip->reg_lock, flags); > > status = igetbyte(chip, port + ichdev->roff_sr); > > civ = igetbyte(chip, port + ICH_REG_OFF_CIV); This does the problem for me. 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=-6.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY autolearn=unavailable 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 EF7DCC433B4 for ; Sun, 16 May 2021 08:32:04 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 553C161182 for ; Sun, 16 May 2021 08:32:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 553C161182 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 053F916A0; Sun, 16 May 2021 10:31:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 053F916A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1621153921; bh=D/PGUDIBj0VH3qlirw7yWpktt+kq8oUh/xxaFx8wLrQ=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=M4KKt+ajRLj3ftSTwlDeeD6yGVPZsDzitFCuq+Tu+l9QwyH7Q9NV9bLI0f6TBz5Fj 2V2jtIbTJJxECjy2NHOWHujBHHgd061D5u8gkOFyfr8GleUXcmfqdnrvaOw+RypNjw 0bBKl7OniDl9N+8mR2amQhw6hSKlYESEB8UXovuk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8B1FCF801DB; Sun, 16 May 2021 10:31:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3A0ECF80217; Sun, 16 May 2021 10:31:09 +0200 (CEST) Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7DA21F8016E for ; Sun, 16 May 2021 10:31:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7DA21F8016E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="iXKRG4CT" Received: by mail-pf1-x433.google.com with SMTP id e19so2935532pfv.3 for ; Sun, 16 May 2021 01:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kpe9vtoQX82iVpEE/u5ousHl/Rp3lITdfSymEOwo3JM=; b=iXKRG4CT+6rGBrHjnLZ8o7QPoZkvq3uqDfOfP3kWL13zRY9wSJ7uW0AIcAydYLN8sM gvrxHC9RuOy1OU23LGAQy+CTfugV/dIxehHZOzE5RaRf+NF44/9ja0sMkrIsQV9Ctuk3 9c/EARrz3ayNbGDksBWs7UXpw4hXPQ6WqkzKU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kpe9vtoQX82iVpEE/u5ousHl/Rp3lITdfSymEOwo3JM=; b=BzGhTot4kpg7oov9utHnIgEEjaMk3pVwiEe6IKCYaHAqeSgKoBq25N81ZJCqUOg4bH v6J9hUCOIsNm8d9ICUQ7LQYGPtjnpmOIGQEwcWSfFLH+axcPD7SGqdwnZeZUKWWtF1FV PUaPk6Fx7nclBdWGtP1Ox2X6Bn69HQJQC7waK1HxqbdSNhfipJnMnx29kJ/KYfXWE7to FtgZkJ1wdzuoKiaNZSIWQPHd9b8vLr+RKJ+aazTkTmQD+/Xxge14u+8XyKrAJ/Az8Omd EOOH1MJ3MLqSAMki5YNxiAjI6PPZOkBSmqIgr7FSgTO6+sOMoVxrlLbwHP8NVWu5RgDg 8d6w== X-Gm-Message-State: AOAM533+de3Qx6plLJ7HT/y1GfVR+qA8PvH3EDMgbVk2zlnbCDy0qcNb pyB52v19G8z0iCcSkTJt21yctQ== X-Google-Smtp-Source: ABdhPJwLDDhgviSBNY7z/RfSjXkpjVVCR629Bd8qWCqCppmwG9HN35CkI6iLOCJ66JIlYATFLFGuNg== X-Received: by 2002:a63:5456:: with SMTP id e22mr48817378pgm.15.1621153862982; Sun, 16 May 2021 01:31:02 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:4596:acad:c782:2f52]) by smtp.gmail.com with ESMTPSA id x27sm7717276pfo.216.2021.05.16.01.31.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 May 2021 01:31:02 -0700 (PDT) Date: Sun, 16 May 2021 17:30:57 +0900 From: Sergey Senozhatsky To: Takashi Iwai Subject: Re: ALSA: intel8x0: div by zero in snd_intel8x0_update() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: alsa-devel@alsa-project.org, Leon Romanovsky , Takashi Iwai , linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" , Sergey Senozhatsky X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On (21/05/14 20:16), Sergey Senozhatsky wrote: > > --- a/sound/pci/intel8x0.c > > +++ b/sound/pci/intel8x0.c > > @@ -691,6 +691,9 @@ static inline void snd_intel8x0_update(struct intel8x0 *chip, struct ichdev *ich > > int status, civ, i, step; > > int ack = 0; > > > > + if (!ichdev->substream || ichdev->suspended) > > + return; > > + > > spin_lock_irqsave(&chip->reg_lock, flags); > > status = igetbyte(chip, port + ichdev->roff_sr); > > civ = igetbyte(chip, port + ICH_REG_OFF_CIV); This does the problem for me.