Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp538856imu; Tue, 27 Nov 2018 16:55:08 -0800 (PST) X-Google-Smtp-Source: AFSGD/UOoT8e3km2Sg/mIM4wkn4JFt+EtCgOo1/R+0sEvdmKpOn1E0LhE4YzU7KH4FQLlLpb18Oq X-Received: by 2002:a63:94:: with SMTP id 142mr30634438pga.74.1543366508442; Tue, 27 Nov 2018 16:55:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543366508; cv=none; d=google.com; s=arc-20160816; b=gNRJysqGdz+j92Knlsk6L1h7BqyT7Kty6WYB75o0ozwxhV5B1FKOumYqpgpZHZjLdO LBxylTZ7+YuM+Kuc9dAcR3/cxwMEczkfFl1bAiXUgamBCQN0WW0f2lY3Vgbi4liWTLjL usANVXmnNWL6kaK9ilR+eHFaTXavSJAP8q4k40mEtDd9R4m8haguueATj6rl6vRChVn1 eCe9TL5/4lkhanUO0tGwHYPQ8vFELPkc7g6pwu0OJiQEBdzQpVMHVU93x3JEFVRnvg2Z 5q9foN2FufT636g6cOcaaatT45ACh3LDvbU8ZU9Xo8/Rw6MY4Zk3VzyrJGgOUud6MssW 0fzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=uxBJ9WHFs1zGaIfgLqF49DJVP88lPRE/QSP94tbhq8Q=; b=YjtKfm+tY/TsQRscafh6ENB6xV7mBxsOP/PkuIKfXfbhLjSoKZcwxpRKgxEJ/r5maB t02S/GvCifXOHNbif0DmHW4C+yiE9uGQnmOz1PKN4Frhh2+mJX64juzk7DdND+9e8T/S oTZSBcdRhb1clM7YKEnwUmkNGOUxy6fpfSXjJkUClXwgcS/ia8qjagZx5NYVqwR3m/G5 Pnvk+2e0V71psHvQMBWXcX9n1pA25Wc1Su/NxYPn1jMNYZB92VMcO0htDupcuOG7YQVH phId0nHJ7CcDR3YeX9v201K4RCWjOoH/0Dp7H67qzook5ZaDqcAPFnatLsD7Ei2MgjET szqQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c3si5056851pgw.425.2018.11.27.16.54.52; Tue, 27 Nov 2018 16:55:08 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbeK1Lxv (ORCPT + 99 others); Wed, 28 Nov 2018 06:53:51 -0500 Received: from mga05.intel.com ([192.55.52.43]:30551 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbeK1Lxv (ORCPT ); Wed, 28 Nov 2018 06:53:51 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2018 16:54:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,288,1539673200"; d="scan'208";a="113005221" Received: from haiyuewa-mobl.ccr.corp.intel.com (HELO [10.67.64.126]) ([10.67.64.126]) by fmsmga002.fm.intel.com with ESMTP; 27 Nov 2018 16:54:06 -0800 Subject: Re: [PATCH] ipmi: kcs_bmc: handle devm_kasprintf() failure case To: minyard@acm.org, Nicholas Mc Guire Cc: Arnd Bergmann , Greg Kroah-Hartman , openipmi-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <1542812905-27337-1-git-send-email-hofrat@osadl.org> <9320680f-679e-fc89-4349-17dbbd30bbfc@acm.org> From: "Wang, Haiyue" Message-ID: <67962bdd-f7db-5a7d-e5d8-baaefd748ab5@linux.intel.com> Date: Wed, 28 Nov 2018 08:54:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <9320680f-679e-fc89-4349-17dbbd30bbfc@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Resend for wrong reply HTML format mail] Great check for making kcs_bmc module be more stable and handle things gracefully. My tag if needed. Reviewed-by: Haiyue Wang 在 2018-11-27 21:36, Corey Minyard 写道: > On 11/21/18 9:08 AM, Nicholas Mc Guire wrote: >> devm_kasprintf() may return NULL if internal allocation failed so this >> assignment is not safe. Moved the error exit path and added the !NULL >> which then allows the devres manager to take care of cleanup. > > > Added the original author.  This looks correct to me, I've included > it, but I would > like Haiyue to comment, if possible. > > Thanks, > > -corey > > >> Signed-off-by: Nicholas Mc Guire >> Fixes: cd2315d471f4 ("ipmi: kcs_bmc: don't change device name")