Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp20015pxh; Tue, 9 Nov 2021 06:45:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJytbEv2k3eHYdLbnKdQ5yQANL1srcLlJqk8Di2yrrRAzqkZNILeme3+gEHNDFKukdZUpAlk X-Received: by 2002:a17:906:b00c:: with SMTP id v12mr10111542ejy.523.1636469147604; Tue, 09 Nov 2021 06:45:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636469147; cv=none; d=google.com; s=arc-20160816; b=NWjpkhlPz2YLIn5UfWpu+C9XYOG7taeZiHrskob+9dosBwnar55Nn820UV/ZwJPaIj xPBXvym6xHRUPIsGqv6i01JtKePmNzgPT6iMsE8WSqGScXr0JB+f2Up4HKWVqvp2Aihf F2r6qK7N980mnVEYOiM/7GIet2geg5kQOfQfXoxEy7Tks37rgIgjV4BK57JSiCVw5ICA iUcSMfwESdjFv4Ub4vhOXC+x14gA/MZlbdl7ABX3/nv/E4Lv17An40MCKMFXUx3DEgm5 ZbxlIk2Tl/bQ9Nx98ga9hR18wdLi/9hBsE1tIxYTD0Y/SOoO7E70usFE5pvtBEYUNGNX BQhg== 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=GTlbhqJysMNyubyEUyGA4/rst+YjF/6CkPSCBOVwqD0=; b=fZEPIkMs5cf7uvvfztxSUv/ZR8XBLKGzdmPBsuBYE9AlCOyjciGRfJVakWH/Ze4kT8 0Ohm0jb9NK3SMTKvM17zz8VRRVJl6KMbgVraafuOeqY3FuLxDP9sCrRj4/n9M1e3rsSl 2f9r5HETUDjKTBOOazGhx2wWe9NBwt65gch5/+AIVIfX6RCZpzyZTwd5QYI0x0cfoNvs qU6vsrz4btWosgeQ4Rel1zOMAZDLoyRvKKNxTYRAVFdwYLxzz0FhVZVob0h8NKkc6f4h Gvd2+kdt3Fh/y/9UULATwHYe00Dx19rwg0JDu7+YqcozQ8pgy8YQEXWWZBqk2gDfqqxy /q0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=KX4vI5Xm; dkim=neutral (no key) header.i=@suse.de; 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=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id le16si28128902ejc.252.2021.11.09.06.45.23; Tue, 09 Nov 2021 06:45:47 -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=@suse.de header.s=susede2_rsa header.b=KX4vI5Xm; dkim=neutral (no key) header.i=@suse.de; 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=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241073AbhKIG1M (ORCPT + 99 others); Tue, 9 Nov 2021 01:27:12 -0500 Received: from smtp-out1.suse.de ([195.135.220.28]:57354 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbhKIG1L (ORCPT ); Tue, 9 Nov 2021 01:27:11 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A07D2218BB; Tue, 9 Nov 2021 06:24:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1636439065; 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=GTlbhqJysMNyubyEUyGA4/rst+YjF/6CkPSCBOVwqD0=; b=KX4vI5Xm6iNHPBy7QNYwKQ4X3j2IJPOulTPflemW/DMHkNgVANlW8q2/Adim3yGs4zlQjo Ok5QBp1DU65+GMxdsFDewBFpgsrDrM7POElVnmBqYhaHFguis2yqMyC4/x1JNm6Y3goi7s BcK7aZxiAUgppJqVwmTWMwJuy+29Pt8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1636439065; 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=GTlbhqJysMNyubyEUyGA4/rst+YjF/6CkPSCBOVwqD0=; b=aF7YShvF8zc6ZTNKbGCgfYkhLhARBIpNWf+lPuzbgW6huaCdNsDQlQtEbcK61ItHwQp8HI n2xrjg7B1EnZ6LDQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 1598FA3B8E; Tue, 9 Nov 2021 06:24:25 +0000 (UTC) Date: Tue, 09 Nov 2021 07:24:25 +0100 Message-ID: From: Takashi Iwai To: Austin Kim Cc: tiwai@suse.com, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, austin.kim@lge.com Subject: Re: [PATCH] ALSA: missing check for possible NULL after the call to kstrdup In-Reply-To: <20211109003742.GA5423@raspberrypi> References: <20211109003742.GA5423@raspberrypi> 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 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 call > 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. Takashi