Received: by 2002:a05:6512:3a82:0:0:0:0 with SMTP id q2csp533384lfu; Mon, 25 Apr 2022 04:09:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6fPOGQLVT1+6CPzaXZ/s1X6bTrtHT8R5UNP6hds/oNiFDPCrMaYbdhmK1o2krp0xjcG67 X-Received: by 2002:a50:d4d2:0:b0:410:9fa2:60d6 with SMTP id e18-20020a50d4d2000000b004109fa260d6mr18382063edj.35.1650884974402; Mon, 25 Apr 2022 04:09:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650884974; cv=none; d=google.com; s=arc-20160816; b=L+6fOWBpZ8WY0/yd/Q86JRaomvjd6KR283872fDkJYMfsXvnwt9dWmzXau8Z0xBF9/ qOvD1K10zgag6iwXTZs3L6MBfFWxsQ70vPqZGZh/0fwlrRSXL6TeA4AsOQuC1/jQ93+g nIIPVfXxdfF89d09YrlHI4UKNrPJIdlj4gT0lmQsMON5eDLQ0eT/6BQptmCXng9jw+Q4 iJY/W6Eo4I6pBT1FLqLH4iey2SJu9n1Hbs+WI/MYLYGLFSpp0g7xpPFcTIMWGvQeT5Ex 6yqsvpAseZiDn7XmSFdrmPdWNr7tfb4BC44TqnIlOwQukeur75NNw4xwCvBpA8hbmZDe weow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=kQc2TW6G4lsVFje2tMGtWR0dZm0cfWAopQn4O15nPTY=; b=gh8/QsQ3CXr3i5yj/14hvxMyHpTvNte4eAprry2uM9QOofLumBb6b9hscb0gCmbNYu 0G28JPS7MRwC47GHPcEIkYCOaQMlgQe0sfyXLVNCWCR26zFdSG3tQbl0+qw/HKzTClIJ bamWIC8Mhs8tDRCNObWC/Qyugx+hSPDP3a405rRAEbHzCALMbxx16Zlxpq6JvBbB+vhG 2ilIWOWKXTJuLnO8hEpCmuOn7/6nBrnCRQW6gHT1T8+ilqLRtG4W5OfxnuwFhW0NWt98 LMLJc3XMVVU5iJZUw4LHlaZ0+5PitEl7mqbrIU0rn+dmuZBoLfoBNeGXFcOUslcRUD0F eUeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gS17fxWy; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a7-20020a056402168700b00425e98189b1si1800498edv.277.2022.04.25.04.09.07; Mon, 25 Apr 2022 04:09:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gS17fxWy; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235342AbiDYF4m (ORCPT + 99 others); Mon, 25 Apr 2022 01:56:42 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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