From nobody Tue Apr 7 20:39:48 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90703C433FE for ; Wed, 19 Oct 2022 16:18:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231148AbiJSQSs (ORCPT ); Wed, 19 Oct 2022 12:18:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbiJSQSd (ORCPT ); Wed, 19 Oct 2022 12:18:33 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F085A1BF22C for ; Wed, 19 Oct 2022 09:18:30 -0700 (PDT) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29J8BHbV027441; Wed, 19 Oct 2022 16:18:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=zD/R05w9rQH2nIBrqXkHmKmhtd3douq60/H0+KYKCxg=; b=dVzgO9Mb7K1f7zsB6P9QNWKeBgnGIC4mW7e8y5GbOzJZhbmnZQK+FsRXe0h4fCZleOe7 4a1av88PjeZMEgtml36EmQvee2lE8j50hVPgtqBiapKg2Akbp3HUn76P1bL2aDiwJGPU 1lfiYZhUxgeHLYh5SAaQohbC455CI7mBKvZYewEnahO371Ln+ugf1/ypphBC0gSSV/Pf LQzrIINbXWglqV5uTBkNhqnzPdTQuXSMym3Af2xNqZMHYHzJJbxwMFhgS5cfwSIbFW/C 0OLnKaLWE4yeuiA77wB/TO+pPCW82OVYkEswIjIgLEjODuJAZKuGh9xkqRHKMvfeyMF0 7A== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ka3j1uhqp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 16:18:13 +0000 Received: from nasanex01c.na.qualcomm.com (corens_vlan604_snip.qualcomm.com [10.53.140.1]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 29JGID2D028693 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 19 Oct 2022 16:18:13 GMT Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Wed, 19 Oct 2022 09:18:11 -0700 From: Mukesh Ojha To: , , CC: , , Subject: [PATCH] f2fs: fix the assign logic of iocb Date: Wed, 19 Oct 2022 21:47:57 +0530 Message-ID: <1666196277-27014-1-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: mjlz_ZOW_AuU4Z9v5eIXSpeO4_68gAL8 X-Proofpoint-GUID: mjlz_ZOW_AuU4Z9v5eIXSpeO4_68gAL8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-19_09,2022-10-19_04,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=875 bulkscore=0 mlxscore=0 phishscore=0 impostorscore=0 spamscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210190092 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint") introduces iocb field in 'f2fs_direct_IO_enter' trace event And it only assigns the pointer and later it accesses its field in trace print log. Fix it by correcting data type and memcpy the content of iocb. Fixes: 18ae8d12991b ("f2fs: show more DIO information in tracepoint") Signed-off-by: Mukesh Ojha --- include/trace/events/f2fs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index c6b3724..7727ec9 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -940,7 +940,7 @@ TRACE_EVENT(f2fs_direct_IO_enter, TP_STRUCT__entry( __field(dev_t, dev) __field(ino_t, ino) - __field(struct kiocb *, iocb) + __field_struct(struct kiocb, iocb) __field(unsigned long, len) __field(int, rw) ), @@ -948,17 +948,17 @@ TRACE_EVENT(f2fs_direct_IO_enter, TP_fast_assign( __entry->dev =3D inode->i_sb->s_dev; __entry->ino =3D inode->i_ino; - __entry->iocb =3D iocb; + memcpy(&__entry->iocb, iocb, sizeof(*iocb)); __entry->len =3D len; __entry->rw =3D rw; ), =20 TP_printk("dev =3D (%d,%d), ino =3D %lu pos =3D %lld len =3D %lu ki_flags= =3D %x ki_ioprio =3D %x rw =3D %d", show_dev_ino(__entry), - __entry->iocb->ki_pos, + __entry->iocb.ki_pos, __entry->len, - __entry->iocb->ki_flags, - __entry->iocb->ki_ioprio, + __entry->iocb.ki_flags, + __entry->iocb.ki_ioprio, __entry->rw) ); =20 --=20 2.7.4