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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F017C433EF for ; Mon, 25 Apr 2022 05:53:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbiDYF4n (ORCPT ); Mon, 25 Apr 2022 01:56:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbiDYF4l (ORCPT ); Mon, 25 Apr 2022 01:56:41 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 722193631E; Sun, 24 Apr 2022 22:53:38 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 2ECC41F383; Mon, 25 Apr 2022 05:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1650866017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kQc2TW6G4lsVFje2tMGtWR0dZm0cfWAopQn4O15nPTY=; b=gS17fxWyHqo1KZGBv5lbFoplErMX/2BdAXSAfKsQHLfkHigKJm+0m/GRfYhTE1ovvT0g+7 O56hsDn2JBG57HOSFxvTj9KmGaUb8RvRLVaJZzQ05Z8FanR2CxxOt+aLMwH7vT40jSIAJt owPwLLHayMSthoXfy6VRJgizziDecXc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1650866017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kQc2TW6G4lsVFje2tMGtWR0dZm0cfWAopQn4O15nPTY=; b=46f5r/YwNCNqtHzdymA3kZPQv/9OxXZ06lmg9tjYqwih/NRX03bdEtqfRdwndMO8aAHddy 2mDxb0Kgm2BSvFAA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 1B3DD2C141; Mon, 25 Apr 2022 05:53:37 +0000 (UTC) Date: Mon, 25 Apr 2022 07:53:37 +0200 Message-ID: From: Takashi Iwai To: Colin Ian King Cc: Takashi Iwai , alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: pcm: Check for null pointer of pointer substream before dereferencing it In-Reply-To: <20220424205945.1372247-1-colin.i.king@gmail.com> References: <20220424205945.1372247-1-colin.i.king@gmail.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/25.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 24 Apr 2022 22:59:45 +0200, Colin Ian King wrote: > > Pointer substream is being dereferenced on the assignment of pointer card > before substream is being null checked with the macro PCM_RUNTIME_CHECK. > Although PCM_RUNTIME_CHECK calls BUG_ON, it still is useful to perform the > the pointer check before card is assigned. > > Fixes: commit d4cfb30fce03 ("ALSA: pcm: Set per-card upper limit of PCM buffer allocations") > > Signed-off-by: Colin Ian King Thanks, applied with the correction of Fixes tag. Takashi 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A1126C433F5 for ; Mon, 25 Apr 2022 05:54:34 +0000 (UTC) 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 EE36A16CC; Mon, 25 Apr 2022 07:53:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EE36A16CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1650866072; bh=yqvECeo/LjV0opRYcVjCxqoRUEuDbNgFaq8Bgtzm8CM=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Bi0vTi9hQ8bIpCxVf57Imy1SvpJ1GRtZwBFqFoLCoL3O9/snVegdaCpmdT/xJQpXZ 1cuAwKQB0OKHcNA5TQeqhaEBwnZ1x5gxcvtgkjaA/qa7IPorhtM57Z40ijYzIfMB6I ChockSMM+Xaung/G/uyVg5kAfNsC/9ztuXGrFHhg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 873B7F80152; Mon, 25 Apr 2022 07:53:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF91BF8014B; Mon, 25 Apr 2022 07:53:39 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (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 66D14F8014B for ; Mon, 25 Apr 2022 07:53:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 66D14F8014B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gS17fxWy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="46f5r/Yw" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 2ECC41F383; Mon, 25 Apr 2022 05:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1650866017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kQc2TW6G4lsVFje2tMGtWR0dZm0cfWAopQn4O15nPTY=; b=gS17fxWyHqo1KZGBv5lbFoplErMX/2BdAXSAfKsQHLfkHigKJm+0m/GRfYhTE1ovvT0g+7 O56hsDn2JBG57HOSFxvTj9KmGaUb8RvRLVaJZzQ05Z8FanR2CxxOt+aLMwH7vT40jSIAJt owPwLLHayMSthoXfy6VRJgizziDecXc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1650866017; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=kQc2TW6G4lsVFje2tMGtWR0dZm0cfWAopQn4O15nPTY=; b=46f5r/YwNCNqtHzdymA3kZPQv/9OxXZ06lmg9tjYqwih/NRX03bdEtqfRdwndMO8aAHddy 2mDxb0Kgm2BSvFAA== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 1B3DD2C141; Mon, 25 Apr 2022 05:53:37 +0000 (UTC) Date: Mon, 25 Apr 2022 07:53:37 +0200 Message-ID: From: Takashi Iwai To: Colin Ian King Subject: Re: [PATCH] ALSA: pcm: Check for null pointer of pointer substream before dereferencing it In-Reply-To: <20220424205945.1372247-1-colin.i.king@gmail.com> References: <20220424205945.1372247-1-colin.i.king@gmail.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/25.3 (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 Cc: alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org, Takashi Iwai , linux-kernel@vger.kernel.org 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 Sun, 24 Apr 2022 22:59:45 +0200, Colin Ian King wrote: > > Pointer substream is being dereferenced on the assignment of pointer card > before substream is being null checked with the macro PCM_RUNTIME_CHECK. > Although PCM_RUNTIME_CHECK calls BUG_ON, it still is useful to perform the > the pointer check before card is assigned. > > Fixes: commit d4cfb30fce03 ("ALSA: pcm: Set per-card upper limit of PCM buffer allocations") > > Signed-off-by: Colin Ian King Thanks, applied with the correction of Fixes tag. Takashi