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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 26 Sep 2009 13:46:01 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	Roland Dreier <rolandd@...co.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>,
	linux-rdma@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] infiniband: fops_get is not required for core,
 uverbs_main.c


fops_get is useless as 'uverbs_event_fops' will always be 'true'.
This also fix compilation warning :

  CC [M]  drivers/infiniband/core/uverbs_main.o
drivers/infiniband/core/uverbs_main.c: In function ‘ib_uverbs_alloc_event_file’:
drivers/infiniband/core/uverbs_main.c:522: warning: the address of ‘uverbs_event_fops’ will always evaluate as ‘true’

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>
Cc: Roland Dreier <rolandd@...co.com>
Cc: Sean Hefty <sean.hefty@...el.com>
Cc: Hal Rosenstock <hal.rosenstock@...il.com>
---
 drivers/infiniband/core/uverbs_main.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index d3fff9e..a59ddd1 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -513,13 +513,8 @@ struct file *ib_uverbs_alloc_event_file(struct ib_uverbs_file *uverbs_file,
 		goto err;
 	}
 
-	/*
-	 * fops_get() can't fail here, because we're coming from a
-	 * system call on a uverbs file, which will already have a
-	 * module reference.
-	 */
 	filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root),
-			  FMODE_READ, fops_get(&uverbs_event_fops));
+			  FMODE_READ, &uverbs_event_fops);
 	if (!filp) {
 		ret = -ENFILE;
 		goto err_fd;
-- 
1.6.0.6


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ