Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4087488ybi; Mon, 3 Jun 2019 05:35:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVh92bJyoXHNfkI0sY+bK2mlxlKIwP/hkqQzbZ4/1zMs4KEZMwdSvt1PUpJKebwT9ewul/ X-Received: by 2002:a63:dd05:: with SMTP id t5mr27455048pgg.229.1559565315381; Mon, 03 Jun 2019 05:35:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559565315; cv=none; d=google.com; s=arc-20160816; b=qrWbEShqyAXI67q7LBaCVHax5grd7rf/6RCiN6rnvvjvZrCFSQopsbmH71KjU/y91/ ly2fu/HJmxhGdkPvFgjYXfMEQV6+qGTLGcRdXKrrKgOknRb/2+ttrx94Qjdir8U54yT4 vPvAFtat2BlbHwCE8eBtVbNYaU+ORubzB7n+CzCINiNpc/gxBvsrJYCtp9xn0TUPPzZA Dc3bnvgl/7cYZgBUOmQQH6cu7eQalJrsL36ndv71VGfv+Qq1rKIxCvHhYCcJkEjM49ep UoDVVpmM8uHJIRy1n/GyUMbzr/G1jW9vPGtQI3z4h3RZFzOQZLpW8Cg6mJDwJYcGEtqb aKgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=u5NCJKtT+wehamnWua0v7FKIiU3eV9qdZ/EuxMdyPUM=; b=AzgXc31G7h29GApEpZNUiCeKsct+v2KRRtX/QV/GZnwx1sAepEwP4nrQMUM/nU1Rta I16nG/kxTdBBIzReUTWLEYUfvGcbM6REJ/qK+sPWI8dxK2pSTaVoo+sx4FzErOGsPq3n tfYkxnjcGcCQVC92Yci8Oalu2bL8Kj8jMnQztAWtFVaecelUpjfYiiWooNeWVDC6qGrA qLoHdEeCvCmuSpZmxQjQ62sVyLLziuRC27yT5G92YpJQGwc+UWz3MsAyZ5iIqmcuAaYk CDlSlsSIYWOKO9HfI4qCNUYcBrb1rKKVE62BRcPLshpaJqLHEwRrayOKCbRAcMkiAlX5 BJuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si17784792pgm.154.2019.06.03.05.34.57; Mon, 03 Jun 2019 05:35:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727591AbfFCMdA (ORCPT + 99 others); Mon, 3 Jun 2019 08:33:00 -0400 Received: from ozlabs.org ([203.11.71.1]:47467 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727349AbfFCMc7 (ORCPT ); Mon, 3 Jun 2019 08:32:59 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 45HZG14vJpz9sP6; Mon, 3 Jun 2019 22:32:57 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: efa9ace68e487ddd29c2b4d6dd23242158f1f607 X-Patchwork-Hint: ignore Content-Type: text/plain; charset="utf-8"; In-Reply-To: <20190526024240.GA14546@zhanggen-UX430UQ> To: Gen Zhang , benh@kernel.crashing.org, paulus@samba.org From: Michael Ellerman Cc: nfont@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dlpar: Fix a missing-check bug in dlpar_parse_cc_property() Message-Id: <45HZG14vJpz9sP6@ozlabs.org> Date: Mon, 3 Jun 2019 22:32:57 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-05-26 at 02:42:40 UTC, Gen Zhang wrote: > In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup(). > kstrdup() may return NULL, so it should be checked and handle error. > And prop should be freed if 'prop->name' is NULL. > > Signed-off-by: Gen Zhang > Acked-by: Nathan Lynch Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/efa9ace68e487ddd29c2b4d6dd232421 cheers