Whamcloud - gitweb
LU-11986 lnet: Avoid lnet debugfs read/write if ctl_table does not exist 34/34634/2
authorSonia Sharma <sharmaso@whamcloud.com>
Mon, 1 Apr 2019 12:40:27 +0000 (05:40 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 15 Apr 2019 16:15:39 +0000 (16:15 +0000)
commit54ca5e471d9f1caf63c57dfe2655e177d26dca0f
treee5102a47f132705c8b6bcab491b7101948f62391
parent4e737a6a8a0f75425255c21eb95e43d9a950193b
LU-11986 lnet: Avoid lnet debugfs read/write if ctl_table does not exist

Running command "lctl get param -n stats" after lnet
is taken down leads to kernel panic because it
tries to read from the file which doesnt exist
anymore.

In lnet_debugfs_read() and lnet_debugfs_write(),
check if struct ctl_table is valid before trying
to read/write to it.

Change-Id: I2450d2f89c2e8a7db793680a4df581282ee46a16
Signed-off-by: Sonia Sharma <sharmaso@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34634
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/libcfs/module.c