From: Chris Horn Date: Wed, 19 Oct 2016 16:17:58 +0000 (-0500) Subject: LU-8733 gnilnd: Remove read capability of cksum_test procfile X-Git-Tag: 2.8.60~12 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=124af2d268b66f55dfefb8f4c7d5c95b4a42b1a7 LU-8733 gnilnd: Remove read capability of cksum_test procfile 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 Change-Id: I406b076f1b66b6d991694c69a9b748ed42c09f39 Reviewed-on: http://review.whamcloud.com/23255 Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- diff --git a/lnet/klnds/gnilnd/gnilnd_proc.c b/lnet/klnds/gnilnd/gnilnd_proc.c index 8e4f0df..5977476 100644 --- a/lnet/klnds/gnilnd/gnilnd_proc.c +++ b/lnet/klnds/gnilnd/gnilnd_proc.c @@ -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 + * Author: James Shimek * * 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,