Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp77671pxh; Tue, 9 Nov 2021 07:34:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDwQPjZPIkY6O4LegjqPTEcjU3BwWhY/iku/CbeCVMsFENNv11exWwDpfVouobjmP5aTBp X-Received: by 2002:a5d:9145:: with SMTP id y5mr5522405ioq.200.1636472081180; Tue, 09 Nov 2021 07:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636472081; cv=none; d=google.com; s=arc-20160816; b=qqH+jfgKOCtKimO31u4+V5nntcL8LVh5CEPGSCoF2Ei6J+Myj3pa0GgLZRrC4l2uE3 MwBhpC6B4KFgeJeTLfRNSwy7ZtdqCtbZwMFFwxEXKarUWKeEpib0YYGYt9Mgn7TBUwjs ENkGt77Nw7+wFXtO31B/I5T6HQtVFxgCdgg6N12rl1mU/vgIVbIvbQxviVsV1uERbF8s HrWyLN4Hwxo4bisHxvLMdnKG4Jd8D4yzegc2d5lVnK9EcJ+x4pkfmUTKaatc1lGeT4Mn jWLKRf9Ty83eUGBj7JFWi9BDA+T8CP6C7SRmJtOIKLmA9Pylf/8986ECO/s4r04kQDCL uY9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DKVg9sxFF7KkDsYsJ2kyK9iOAkgZCIk72eYOX0sPY7I=; b=GcENAAWScVwOK00HFeiJyxX3wb7KRDzyUMmZKOBYQQDL2fSey+arIdiLOllY2AQ9V0 178/a4eaoD8O3ylJMZbM8adIYorBNXnPgzYDqi5jZgy55XG7DoeOLsY65RIUoZDjWynT joOTjfneOi8N0C6q1iXQeJ8HAHxCoHqHRa16nkzUl/6q5JDqxBtVUOeqwsujmXFkiSvm 5+/fgSY6LocPDYTtTbBS49jcnLjwT4zmAFMbDUNHRddvQfgkoHeVN9D5dMenzHivj9vr rSdnGDT1MYQgaAvFOBqxCQIG0zvonctPd8OzdKZKe32U7ugv4hx+RLQ5lpTYTKSH8tBR vrwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qcqOzcb+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a8si242213jap.30.2021.11.09.07.34.26; Tue, 09 Nov 2021 07:34:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qcqOzcb+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243995AbhKIIXn (ORCPT + 99 others); Tue, 9 Nov 2021 03:23:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236169AbhKIIXm (ORCPT ); Tue, 9 Nov 2021 03:23:42 -0500 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA856C061764 for ; Tue, 9 Nov 2021 00:20:56 -0800 (PST) Received: by mail-pg1-x536.google.com with SMTP id r28so17796690pga.0 for ; Tue, 09 Nov 2021 00:20:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=DKVg9sxFF7KkDsYsJ2kyK9iOAkgZCIk72eYOX0sPY7I=; b=qcqOzcb+4K1liquhkvg0C6k9R6kPGF+XGZY3Jt57IOJF4Kog3dkDHhVlcIFKj9jUWG EkOD5mIo/yMJ1/pDLUKXqhZnaIY1zClvP9oYbhtcf79UtIYa8d8uippHbO5C7n2dBI6D iF7NRgtSFKPiEH8s/tuOVmnlpXg/2RBrAwSD+FBt4TnETGDdxp5HeiDH2T+rGuOnC4nq F+vvowMTPZrDJ/DXfB6MR6L32XYafWSlhh6Q1DISoxSUoemkEaaaQ8NrUBYN0Bh93df1 HnQWoVFmv1QQaVZMq+7A1TW5nyEJfOgAfLqCi6qt8Mj2h+gY4xtY/uZA/FQNLdzUIBLm zdzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=DKVg9sxFF7KkDsYsJ2kyK9iOAkgZCIk72eYOX0sPY7I=; b=DNwPXFLbzCGsO5n1pf65wea6zka9T+Vl2Gvm3N5iL7HvGHkjVOBESrjYAMRiSa9Asy ILx92IZANSaRpD371RsWcT15eLJb/dCvC4gXBpisR7aDSsBsrzg8h9aflBzzRBVOyuIf WVnk5u8ZPHbv+iG4VsrblX1KeD9CKefgMyQSaBtQ6+ZVuaR67x54pje5CkyGTRqiPdXu 8bUbM0WLpdRfe6lhp5T0VU50Ct1L4ce5YzNXjDSOPcWsFZKcK5eobetK/dXHVr+eruti RmRS7U5stIOb/AfELV3FIBnYWpwCgkvAtbj2lsOHdaWpfwEg8TyOvDkd+4bwRnHtrJkP YEpw== X-Gm-Message-State: AOAM533550vNZ8exqTlK6JdiOh1QU5xL8zhKz3ea6Ex3xCIn6Rsj6Z9W v13gstH41su9rhqbCSt4HwcORTMRC6sMEE/+ozM= X-Received: by 2002:a05:6a00:15ca:b0:49f:d22b:afff with SMTP id o10-20020a056a0015ca00b0049fd22bafffmr6214367pfu.35.1636446056399; Tue, 09 Nov 2021 00:20:56 -0800 (PST) MIME-Version: 1.0 References: <20211109003742.GA5423@raspberrypi> In-Reply-To: From: Austin Kim Date: Tue, 9 Nov 2021 17:20:47 +0900 Message-ID: Subject: Re: [PATCH] ALSA: missing check for possible NULL after the call to kstrdup To: Takashi Iwai Cc: tiwai@suse.com, perex@perex.cz, alsa-devel@alsa-project.org, Linux Kernel Mailing List , =?UTF-8?B?6rmA64+Z7ZiE?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2021=EB=85=84 11=EC=9B=94 9=EC=9D=BC (=ED=99=94) =EC=98=A4=ED=9B=84 3:24, T= akashi Iwai =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Tue, 09 Nov 2021 01:37:42 +0100, > Austin Kim wrote: > > > > From: Austin Kim > > > > If kcalloc() return NULL due to memory starvation, it is possible for > > kstrdup() to return NULL in similar case. So add null check after the c= all > > to kstrdup() is made. > > > > Signed-off-by: Austin Kim > > Thanks, applied now with a minor coding-style fix (we need no extra > parentheses), the correction of the subject line with the proper > prefix, and the addition of Cc-to-stable. > Great, Thanks BR, Austin Kim > > Takashi