lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1804280918360.2700@hadrien>
Date:   Sat, 28 Apr 2018 09:19:43 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Sujeev Dias <sdias@...eaurora.org>
cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, Tony Truong <truong@...eaurora.org>,
        kbuild-all@...org
Subject: [PATCH] mhi_bus: dev: netdev: fix debugfs_simple_attr.cocci
 warnings

From: Fengguang Wu <fengguang.wu@...el.com>

 Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
 for debugfs files.

 Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
 imposes some significant overhead as compared to
 DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

Fixes: e693c860afd8 ("mhi_bus: dev: netdev: add network interface driver")
CC: Sujeev Dias <sdias@...eaurora.org>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---

url:
https://github.com/0day-ci/linux/commits/Sujeev-Dias/mhi_bus-core-Add-support-for-MHI-host-interface/20180428-065959
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago

 mhi_netdev.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/bus/mhi/devices/mhi_netdev.c
+++ b/drivers/bus/mhi/devices/mhi_netdev.c
@@ -692,8 +692,8 @@ static int mhi_netdev_debugfs_trigger_re

 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(mhi_netdev_debugfs_trigger_reset_fops, NULL,
-			mhi_netdev_debugfs_trigger_reset, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(mhi_netdev_debugfs_trigger_reset_fops, NULL,
+			 mhi_netdev_debugfs_trigger_reset, "%llu\n");

 static void mhi_netdev_create_debugfs(struct mhi_netdev *mhi_netdev)
 {
@@ -762,8 +762,9 @@ static void mhi_netdev_create_debugfs(st
 			return;
 	}

-	debugfs_create_file("reset", mode, mhi_netdev->dentry, mhi_netdev,
-			    &mhi_netdev_debugfs_trigger_reset_fops);
+	debugfs_create_file_unsafe("reset", mode, mhi_netdev->dentry,
+				   mhi_netdev,
+				   &mhi_netdev_debugfs_trigger_reset_fops);
 }

 static void mhi_netdev_create_debugfs_dir(void)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ