Whamcloud - gitweb
LU-8733 gnilnd: Remove read capability of cksum_test procfile 55/23255/5
authorChris Horn <hornc@cray.com>
Wed, 19 Oct 2016 16:17:58 +0000 (11:17 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 28 Oct 2016 23:50:00 +0000 (23:50 +0000)
When the old create proc interface was deprecated cksum_test was
updated  to use the new file operations table. Inadvertantly read
was left as a capability without actually defining a function
that the file would use when someone tried to read the file.
This causes a kernel crash when cksum_test is read, though it can
only be done by the root user.

The fix is to remove the .read op from the fops table for the
cksum_test proc entry

Test-Parameters: trivial
Signed-off-by: Chris Horn <hornc@cray.com>
Change-Id: I406b076f1b66b6d991694c69a9b748ed42c09f39
Reviewed-on: http://review.whamcloud.com/23255
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lnet/klnds/gnilnd/gnilnd_proc.c

index 8e4f0df..5977476 100644 (file)
@@ -1,9 +1,10 @@
 /*
- * Copyright (C) 2009-2012 Cray, Inc.
+ * Copyright (C) 2009-2012, 2016 Cray, Inc.
  *
  * Copyright (c) 2013, 2015, Intel Corporation.
  *
  *   Author: Nic Henke <nic@cray.com>
+ *   Author: James Shimek <jshimek@cray.com>
  *
  *   This file is part of Lustre, http://www.lustre.org.
  *
@@ -198,7 +199,6 @@ kgnilnd_cksum_test_seq_open(struct inode *inode, struct file *file)
 static const struct file_operations kgn_cksum_test_fops = {
        .owner   = THIS_MODULE,
        .open    = kgnilnd_cksum_test_seq_open,
-       .read    = seq_read,
        .write   = kgnilnd_proc_cksum_test_write,
        .llseek  = seq_lseek,
        .release = seq_release,