Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2785650pxb; Tue, 21 Sep 2021 07:38:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4C/5tm2Oa2Da6eYHB0tJLAn+PXdmVM6bmu0s774l9T2C47nH/nXETPtGymw8dvSWR7hK8 X-Received: by 2002:a1c:f00a:: with SMTP id a10mr4987675wmb.112.1632235089835; Tue, 21 Sep 2021 07:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632235089; cv=none; d=google.com; s=arc-20160816; b=yzjV5xldoaH1n8+UX4YqnLGuNUvFmLZqCp80l2qVkgmtMaWkxtK14QLx206DhYX03e 1auci7CPQqJN6Mr+fe8EuHy4NGwRkMpLb6HISwC7QAhe0u24WJNFSiEebFGUUiLbaAjV LVhMmkgySfZIlTdAicXfSrEM3bxnFZjtGbzoKbNlE2tZVQmvuDeFSWHNSA8Ebe1BziK+ KYUN8fXRu43ubU3AvePJ0XWj9l1npWcRthJz/K0DLX/pDBe2v8bRKb215Ot1hLlVpXwb TBHIY1KVaSpSA4nrESWTpTu68EHPa4C1n29+gTvhK830TGjJUCpuk0GwhdqBmfL+JuKw 3nTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Zf1jtvX2T5ybClyxeQOnprRBWjl6vEiWYjopKoG+64c=; b=gakIG4w+zlZuwMc0/aWzLhGFPfYQfBH3uEu8Kj8kGiKJHmBPmXUxUCPhuyAA7s9RmS /B4lSv+Y98et3YgwV9UnOVRY1VeJArEjasC4Y1QvpefctLHaJLXnI8OL188eh+B8TFI8 Em5c7xKSF+VH/Kkz+Lc0ph52X8vPek89C7JimLymAZPomJ6IYkG0yvekpneUDlkJOUUj g57MUYFg9ZPIHafcyumu07cGpigR0jceTxUwCSMLYD3vGl7J52eT9UWhxeh2E3y6AE28 /1iXvFsH3WfLow5I5dezOuHdHtazTaJSqxNaRrVplNKlvrC2nPl7AyhDmgWjAnQKOpBw ST0Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si18776973edr.430.2021.09.21.07.37.45; Tue, 21 Sep 2021 07:38:09 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233707AbhIUOhP (ORCPT + 99 others); Tue, 21 Sep 2021 10:37:15 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:40851 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233701AbhIUOhP (ORCPT ); Tue, 21 Sep 2021 10:37:15 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=alimailimapcm10staff010182156082;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Up8yjG5_1632234933; Received: from e18g09479.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0Up8yjG5_1632234933) by smtp.aliyun-inc.com(127.0.0.1); Tue, 21 Sep 2021 22:35:44 +0800 From: Gao Xiang To: linux-erofs@lists.ozlabs.org, Chao Yu Cc: LKML , Gao Xiang , stable@vger.kernel.org Subject: [PATCH 1/2] erofs: fix up erofs_lookup tracepoint Date: Tue, 21 Sep 2021 22:35:30 +0800 Message-Id: <20210921143531.81356-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.24.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix up a misuse that the filename pointer isn't always valid in the ring buffer, and we should copy the content instead. Fixes: 13f06f48f7bf ("staging: erofs: support tracepoint") Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Gao Xiang --- include/trace/events/erofs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h index bf9806f..db4f2ce 100644 --- a/include/trace/events/erofs.h +++ b/include/trace/events/erofs.h @@ -35,20 +35,20 @@ TP_STRUCT__entry( __field(dev_t, dev ) __field(erofs_nid_t, nid ) - __field(const char *, name ) + __string(name, dentry->d_name.name ) __field(unsigned int, flags ) ), TP_fast_assign( __entry->dev = dir->i_sb->s_dev; __entry->nid = EROFS_I(dir)->nid; - __entry->name = dentry->d_name.name; + __assign_str(name, dentry->d_name.name); __entry->flags = flags; ), TP_printk("dev = (%d,%d), pnid = %llu, name:%s, flags:%x", show_dev_nid(__entry), - __entry->name, + __get_str(name), __entry->flags) ); -- 1.8.3.1