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: 120687 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5878066qgn; Tue, 5 Dec 2017 07:22:08 -0800 (PST) X-Google-Smtp-Source: AGs4zMb2WjeYtIqmcEirnQdacxqv6DatlPUVQmnW++Ik2G5ItOYo90lJQzre/zuaJeNsWgJ16Kcn X-Received: by 10.101.76.204 with SMTP id n12mr18179854pgt.0.1512487328424; Tue, 05 Dec 2017 07:22:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512487328; cv=none; d=google.com; s=arc-20160816; b=GTSQgT2dcc7KCSDnoMvoiITPsFt7dR5keVAMwyWj4+kc1I0yo2F/YvOPLCe1pSC6KR tztmGnfXsdgRumzJhanpR1PHhC49Nfu3x4LmOjWQiqOeB0ZjW5PFKssQsGagh0I/zLwi DcRbu31j9MOSdcZZtWqldliDJ3dfDmriAFV10atVtHiRs/hUdH3k0n1w4Jqtc9OSxwST NQpDHjsbo34JmSRDPhy1i/blLtY7PbydyjR/3eFq/ucFUoIWBIFRfa3i8sH0UsskUkTb hhKdeaWtc8w/NyzQYDdTL5lZ39/QUwPXyIqlGzHq4js/e2A5h/sXDYm10gXLVRkaLLsK f5LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=gKYN8U0gSWM7iDT6kPQW/S2ZBFKzpdAdtEnrXL6P8RE=; b=u0TE3qXRsjtMMcmgEYglQjPZ5DwVfU5FQhgLj08sFaMW0gNHCBaTXv7p89c7sLIgqv nd6Y2UTI7y3Oz5gwgEkN1zCMbSS+2cyCJ92y8FmEo3Qn4V9FGsZztNWPSqGi3GCtpOkB bU9Hv9cysDWGCoYtfgI83+ER87ax6FNQ9fHaPduygn754uwwiTcn8lpr3itd/GBTRBaq SfGxInrf/sFBYZfx1Ju3NKPuUP+lsZJommPA1Sqf6f8ZW433ivbhRy0IFBJjPhlZ8YMg Q9N4boOFFnAzsyj7ToEhQHEcqxRJYreYYNvqMdFxNPeVpb2dIwJ2ZgevtEumxUA3EJmJ Y3jQ== 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 n5si204722pgp.656.2017.12.05.07.22.08; Tue, 05 Dec 2017 07:22:08 -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 S1752656AbdLEPWG (ORCPT + 28 others); Tue, 5 Dec 2017 10:22:06 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:61164 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750740AbdLEPWF (ORCPT ); Tue, 5 Dec 2017 10:22:05 -0500 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 Cc: Kees Cook , Arnd Bergmann , Andrew Morton , Ingo Molnar , Peter Zijlstra , Joseph Qi , piaojun , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [PATCH] ocfs2: use get_task_comm 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 JmkK3ivhVDl1CrHDddDt529Crnh1Y0w7QOIoDATxEqhNTyo9A4e820M0cttAy+LiDlbI3QT dxHyyOma4ntgk5JqqXIjA== X-UI-Out-Filterresults: notjunk:1; V01:K0:uVxfFG9f5YM=:Gh5weQaiZiwpouWaXUf1TX s0fmiSeCUZDNDV6DnNdG6gmoqkiaqwlXDX+fGx3zaMLCDD0icdaTR7Etrb3yTKYGYpkka3O/A 5orrKw/gqVvA+3Lt6YjlNoYeyJ+Gm+oOzRaGdkHsaJryDSDuKzHM9f+OCKdNfCmDm8xGphJwP Ty+iE9B3wcIEBydQBTQEdZn0d26rBIkc/ZV7UOY8Ye/G2yB3QlBoGmkFHgTuakP5sHIZVOkIt PrJsDm9K7B6r6I4oW21XctFI5ZeANOBZM8lFcEC/3OXQPnoXr2/Dm4aEJG53njdJEA/MAXS/c i5zWPFmpYmxRXZjNOhE3vyCgRyHOFNM09JZngW9cv+u8v4wSO7Ju5Ey/3IRgd/1OiPbn5LWCf UJSedpS51NsjQPA13pKomjJIpBxx57ag4WmAJEhTbzS5+qZjqyh6w6pBgzemXfzZ17xLdY7El WlqsQ1UDdFCM7hO3UlfMD24Gm7WTVK2n/c8wbUJWI8g/SlOnxlhcBRZw6Bn5KFC6TGyzXErkx xuRXu89fNPUJX0TdAdViPNRsE/N2baQkj77sBdWYF6hcOuUwXtrUtotUyJ0n6GzDXUyQVA7U5 0AzMZsaKWSMjK86jVeK7OVuqTgn/HU6E0huOZ9yHIeYynVDNIi2a/MAJE75afZD0a0QrxQOfb eDPMkC6QBQLE7PP7jlSOyuoDdYExNQFkZ7mKmzSAw8kzIv3/LekM/mX+zkbtoVFGp4ADSLRf2 +Iud/3N1N9ROFuUUm/n69Rt2gz5Swmof4hjZwA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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,