From patchwork Tue Dec 5 15:20:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10093217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F4E060327 for ; Tue, 5 Dec 2017 15:22:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97CA71FF29 for ; Tue, 5 Dec 2017 15:22:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C91C28680; Tue, 5 Dec 2017 15:22:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id ECB481FF29 for ; Tue, 5 Dec 2017 15:22:14 +0000 (UTC) Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id vB5FLxgi026948 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 5 Dec 2017 15:21:59 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vB5FLux8029992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Dec 2017 15:21:56 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eMF2i-0004zz-FY; Tue, 05 Dec 2017 07:21:56 -0800 Received: from aserv0022.oracle.com ([141.146.126.234]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1eMF2O-0004zU-Th for ocfs2-devel@oss.oracle.com; Tue, 05 Dec 2017 07:21:37 -0800 Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id vB5FLa8l028903 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 5 Dec 2017 15:21:36 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.21/8.16.0.21) with SMTP id vB5FHW9K034207 for ; Tue, 5 Dec 2017 15:21:36 GMT Authentication-Results: oracle.com; spf=none smtp.mailfrom=arnd@arndb.de Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by userp2030.oracle.com with ESMTP id 2enertstk9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 05 Dec 2017 15:21:35 +0000 Received: from wuerfel.lan ([149.172.96.106]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.129]) with ESMTPA (Nemesis) id 0MEJKO-1eJyu33Vqy-00FP2I; Tue, 05 Dec 2017 16:21:23 +0100 From: Arnd Bergmann To: Mark Fasheh , Joel Becker Date: Tue, 5 Dec 2017 16:20:50 +0100 Message-Id: <20171205152110.2050975-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:7C+UV30zD7NDw68LrXhUcWfQ+oduU2sQQkmcpASnsOS6wmpgU8H wU2E2ESVw1Y9Mt74SAbWjSegL2m82uJWS8Xhx7Y2qvKMkn0RrcWpWIQZDeA3txRlUbFTsSB JmkK3ivhVDl1CrHDddDt529Crnh1Y0w7QOIo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f19Yflx5GUcZHnBYQ2URClhcFx8EGgQbGxMHG0gaThhOS08FGxoEGxoaBB4SBB8QGx4aH xoRCl5ZF3hybB5IEQpNXBcZHRMRCkxaF2loaUJNXREKTU4XaBEKQ1oXGBsYBBgYHQQbGBwEGxkb EQpCXhcbEQpEXhcYEQpESRcTEQpCRhdnE21gG1tlQh9+fREKQlwXGhEKQkUXY1kSTkxpc1l5RFg RCkJOF2UTcG1HS0RtXRNlEQpCTBdseRhzQEcSWGASQhEKQmwXZBhEenxue3N5EmERCkJAF2FibG tYZXgcSFJ6EQpCWBdifW95AU8YGXBwexEKWlgXGxEKcGgXZWh9fVJTQxh8T2MQGhEKcGgXYW5zS GlyX1xAR08QGhEKcGgXaFhgBXN+G0VQcHkQGhEKcGgXYlhrWXsFehhOSHkQGhEKcGgXYUthUE1g WB4eRlgQGhEKcGwXZ2AfX0h8T19tewUQHBoRCnBDF21aTVhgfF4FZENAEBkaEQptfhcaEQpYTRd LESA= X-PDR: PASS X-ServerName: mout.kundenserver.de X-Proofpoint-SPF-Result: None X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8735 signatures=668637 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=30 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=283 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1712050221 Cc: Kees Cook , Arnd Bergmann , Peter Zijlstra , linux-kernel@vger.kernel.org, Ingo Molnar , ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH] ocfs2: use get_task_comm X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Virus-Scanned: ClamAV using ClamSMTP While reviewing all callers of get_task_comm(), I stumbled over this one that claimed it was not exported, when in fact it is. Accessing task->comm directly is not safe, so better convert this one to using get_task_comm as well. Signed-off-by: Arnd Bergmann --- fs/ocfs2/cluster/netdebug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c index 74a21f6695c8..a51d001b89b1 100644 --- a/fs/ocfs2/cluster/netdebug.c +++ b/fs/ocfs2/cluster/netdebug.c @@ -130,6 +130,7 @@ static void *nst_seq_next(struct seq_file *seq, void *v, loff_t *pos) static int nst_seq_show(struct seq_file *seq, void *v) { struct o2net_send_tracking *nst, *dummy_nst = seq->private; + char comm[TASK_COMM_LEN]; ktime_t now; s64 sock, send, status; @@ -142,8 +143,8 @@ static int nst_seq_show(struct seq_file *seq, void *v) sock = ktime_to_us(ktime_sub(now, nst->st_sock_time)); send = ktime_to_us(ktime_sub(now, nst->st_send_time)); status = ktime_to_us(ktime_sub(now, nst->st_status_time)); + get_task_comm(comm, nst->st_task); - /* get_task_comm isn't exported. oh well. */ seq_printf(seq, "%p:\n" " pid: %lu\n" " tgid: %lu\n" @@ -158,7 +159,7 @@ static int nst_seq_show(struct seq_file *seq, void *v) " wait start: %lld usecs ago\n", nst, (unsigned long)task_pid_nr(nst->st_task), (unsigned long)nst->st_task->tgid, - nst->st_task->comm, nst->st_node, + comm, nst->st_node, nst->st_sc, nst->st_id, nst->st_msg_type, nst->st_msg_key, (long long)sock,