Received: by 10.223.185.116 with SMTP id b49csp1137919wrg; Fri, 23 Feb 2018 12:36:14 -0800 (PST) X-Google-Smtp-Source: AH8x224NOsFoxedxfTKPjMkLxWFWKdp0ScbZOAeNzPjj1Mhr5Jg4d1iXVSwCWCiiL98cjzPvvJzu X-Received: by 2002:a17:902:8489:: with SMTP id c9-v6mr2750248plo.439.1519418174108; Fri, 23 Feb 2018 12:36:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418174; cv=none; d=google.com; s=arc-20160816; b=axpY9aR9kGmExlCga+HmsKCTwbzz0nI8RN29WFaqjRSgN1UZK5BrHvdDlORROafXNx fWX0uGI9tO1jokFQsIefQJ/ttBt/ncqPUPX9WST00Q9dnr/N4saDRc/wBBcR8by4pvP9 hx5g+fYqRuXGGluha2uh6NK6zvbgjkZwvPxWyGxTMGzhak8uWYiVLfJP0meYTI6LG9ts KpoU7r0VZGMBK2KWdCimskSgX9Ht/fL0uL3W/sPP2o0YikoHhRsAS+/TMNXeIjz3m9Ci RIYJUiGhb9YsCo5ZTfwhtp3BPPbfg829kzMR6v7uwq+2FUKsDmhBQjWUtkWIle3/ln/J IaxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=D86h9isstgexjECFBdL0YBbN4r+ZO93ZUJ1Na5bAxl4=; b=QyjwaBY1spKdz3viAlcHkvu7SZStk9y0VMTBcuIXE7Rv5gSk3qfl2G/kEoXvYHsV92 cfDJKzgvATirHC+ep46+d1Sf4WqmdGeR/AZTRqdbQ3IlPJQoVV73vbirolB9NR39MjHZ IS6doHt7+X4tWIjpFOqHqQ2QgpsYBHQHkr8nF54Kd75OXNbepe96Erj2OS2+PN4wGe82 ygpyi1XOnzLs7ggOsJr31dhLs1EZLiHsramHffdZFpivjxFkl3LRiMoBj84+b4y6DrIs GfPlCD4QZdTemABCbidwKQb2BiV3ZhX1GauXbu2UGeTMU3bZRuFHFA6RG2YSQAcDxMJP 0S5w== 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 m27si2337755pfg.64.2018.02.23.12.36.00; Fri, 23 Feb 2018 12:36:14 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753698AbeBWSfB (ORCPT + 99 others); Fri, 23 Feb 2018 13:35:01 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37116 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753653AbeBWSe5 (ORCPT ); Fri, 23 Feb 2018 13:34:57 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 72070126E; Fri, 23 Feb 2018 18:34:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cai Li , Chunyan Zhang , Stephen Boyd , Sasha Levin Subject: [PATCH 4.4 052/193] clk: fix a panic error caused by accessing NULL pointer Date: Fri, 23 Feb 2018 19:24:45 +0100 Message-Id: <20180223170334.152831819@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cai Li [ Upstream commit 975b820b6836b6b6c42fb84cd2e772e2b41bca67 ] In some cases the clock parent would be set NULL when doing re-parent, it will cause a NULL pointer accessing if clk_set trace event is enabled. This patch sets the parent as "none" if the input parameter is NULL. Fixes: dfc202ead312 (clk: Add tracepoints for hardware operations) Signed-off-by: Cai Li Signed-off-by: Chunyan Zhang Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/trace/events/clk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/trace/events/clk.h +++ b/include/trace/events/clk.h @@ -134,12 +134,12 @@ DECLARE_EVENT_CLASS(clk_parent, TP_STRUCT__entry( __string( name, core->name ) - __string( pname, parent->name ) + __string( pname, parent ? parent->name : "none" ) ), TP_fast_assign( __assign_str(name, core->name); - __assign_str(pname, parent->name); + __assign_str(pname, parent ? parent->name : "none"); ), TP_printk("%s %s", __get_str(name), __get_str(pname))