Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2300912ybi; Mon, 17 Jun 2019 02:24:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzAD1Z6a9dJ0a6Plm51PRt1K+DEludnK3gyLNnidDucDBQnnTDiV9YjX3n8ruVPWfhcjM/f X-Received: by 2002:a17:90a:2743:: with SMTP id o61mr25330859pje.59.1560763445211; Mon, 17 Jun 2019 02:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560763445; cv=none; d=google.com; s=arc-20160816; b=XS8oIpvLNq/bRXA3HHMRlmVckkHp+RpneBnzRs3ubzDcJCsWmv5HcAlw3gqpOQoSEh xFe+7C2eyxufWEQ6AZA6DJ7sZarmhVMkwypqsYH9cGEA0OV1gQ4R40sFcVTKAVb+Qm7U QX198qk6Vwp2qAyEwmK9Oktv/hEGy2U7FfMxWJSOgtY8oIDDm5MRrDvzwxdJiS2oswLO D5hPDeKKVkOq5dsLnafNPFqaYGcEzXt/VL9yx2rl1wB191ipCVfMQ6QTiXa0T6RgKGTQ V4tE5Tz8bOusdVAV+V3q2YPKtf2rdLo2E+P6fZsf6058QebFp08w2eco9IqJ4aMxWaIr WXag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mm/MzCVqKcyrtAkNiFo5ey/RdkAUyCycunAmsvAE86I=; b=Fpk6ZF/m5R2RPSU6395mu2kJjVipAq8vILMCCgMPIuGhrr8yKCUh0ZnHXnhqpt7hxg +cqqa2rsZdjanKmT1awkGE5XCjt+T5BNeFwWd6/GH1kvetibVCFL2VxScmF7ZrIkCKTa RoU1s/K0SrzOLI1nqLf7xpUA71rIIVtnncTBBphYL0elQ6GJSAGWcOzYUU/fI0rTmDZV 8aB1aZBh0+z87NtUfxVkBkqqO4OljycpXOCpXPAgq14PLVTRZ9mfkW3DfLD562zDvG8c W+pX9pfTlY+b0sMQYmCBSSJKL0dKAEC6epAoqzOV91UQq6SJCWIRz0ExWSTNMU0ZMJiZ uApw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kCqpL+mI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si10241136pga.205.2019.06.17.02.23.49; Mon, 17 Jun 2019 02:24:05 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kCqpL+mI; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727972AbfFQJXf (ORCPT + 99 others); Mon, 17 Jun 2019 05:23:35 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45449 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726286AbfFQJXf (ORCPT ); Mon, 17 Jun 2019 05:23:35 -0400 Received: by mail-pf1-f195.google.com with SMTP id r1so5336612pfq.12; Mon, 17 Jun 2019 02:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=mm/MzCVqKcyrtAkNiFo5ey/RdkAUyCycunAmsvAE86I=; b=kCqpL+mIstO+C5j0tCc3sH0FHwAOHw+NR+PmwQqYcD/O8eRi/hcNgJgZMocXXj0jyM q8B4rhn6mD6hW4j6it6A/fOOnyNiWPxBMr+owe/khCBpiCjANJh5CedTHlvW4bbxoRXY igLkmnBoZcaf0P3DAF16DkVO89yEcJ1g1LNQeHExuI1BsGSm9EANDLNQKUf7rxeRlphO 72SaPh+M53xabikhB6FBA6ZkYCO9a2/WCgK06Wykl4Sk9XQm0WoEYPtaNkxm6NQJjcuB oVrp5Kw2rKDbgoXRM2HemZK7hA3vcL28RxLuRf8e2A+klc9T80jA58jZbasY/F4wts5G II8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=mm/MzCVqKcyrtAkNiFo5ey/RdkAUyCycunAmsvAE86I=; b=uQDL5ktFSG8aECgc4hTkM3+a5Jz/gLnyat3h1RoBpFfBX/y63+hOV0ugZPR7Uvzjm3 9ryeCufofydPX6Cx8uJpEXgM8IahdHHHmzB/JXzPHu/EDPnLtg7gPYwcQheskT/zpJOC q0pD4b3NUA8Uxtq2V2WWn96Wgj/xS+4KlMgj3Gp6JQBncxXOja/wBEMirSlptjkvA1ui mV5t/ijjk/+n2YaybOmBNClr0fk00iYZDD0IEmiqxc7kczvLw9UzH3c5g4sOBMdUeBxn DCxrdLQ9DqfKXQSwdmQKdPGkSLAUadPiuyFyL9IYwo2LCAsnBingkt1iPt3nbBP1C4pp qstg== X-Gm-Message-State: APjAAAVkKH6vYiUHsD6zhVAl0yEbVJigb7Btwu+PIjWutQdyImBiwdHx vrvo1+hLs5nb1gapstb3H/QNLrl9/HufBQ== X-Received: by 2002:a63:570c:: with SMTP id l12mr48974700pgb.252.1560763414394; Mon, 17 Jun 2019 02:23:34 -0700 (PDT) Received: from ubuntu ([104.192.108.10]) by smtp.gmail.com with ESMTPSA id p7sm21369214pfp.131.2019.06.17.02.23.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 02:23:33 -0700 (PDT) Date: Mon, 17 Jun 2019 02:23:28 -0700 From: Gen Zhang To: jassisinghbrar@gmail.com Cc: thierry.reding@gmail.com, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH] tegra-hsp: fix a missing-check bug in tegra_hsp_doorbell_create() Message-ID: <20190617092328.GA3764@ubuntu> References: <20190530011920.GA6490@zhanggen-UX430UQ> <20190608161144.GA4090@zhanggen-UX430UQ> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190608161144.GA4090@zhanggen-UX430UQ> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 09, 2019 at 12:11:44AM +0800, Gen Zhang wrote: > On Thu, May 30, 2019 at 09:19:20AM +0800, Gen Zhang wrote: > > In tegra_hsp_doorbell_create(), 'db->name' is allocated by > > devm_kstrdup_const(). It returns NULL when fails. So 'db->name' should > > be checked. > > > > Signed-off-by: Gen Zhang > > Acked-by: Thierry Reding > > --- > > diff --git a/drivers/mailbox/tegra-hsp.c b/drivers/mailbox/tegra-hsp.c > > index 11fc9fd..b613c46 100644 > > --- a/drivers/mailbox/tegra-hsp.c > > +++ b/drivers/mailbox/tegra-hsp.c > > @@ -292,6 +292,8 @@ tegra_hsp_doorbell_create(struct tegra_hsp *hsp, const char *name, > > db->channel.hsp = hsp; > > > > db->name = devm_kstrdup_const(hsp->dev, name, GFP_KERNEL); > > + if (!db->name) > > + return ERR_PTR(-ENOMEM); > > db->master = master; > > db->index = index; > > > > --- > Can anyone look into this patch? It's acked by Thierry Reding > . > > Thanks > Gen Could anyone look into this patch? It's not updated for about 20 days. And I am really on a deadline to get this patch applied. Thanks Gen