]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: Add read-only/write-only size_t file ops
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 13 Oct 2015 01:09:11 +0000 (18:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 Oct 2015 05:09:03 +0000 (22:09 -0700)
commitf66f909d88d328942433edfa730504a076876973
tree3bb5b961cf76c274ece5bea370df4f6e1f873f42
parent56a79d0d5d8ec5dd8762ac118fada99007b41def
debugfs: Add read-only/write-only size_t file ops

There aren't any read-only or write-only size_t file ops, but there
is a caller of debugfs_create_size_t() that calls it with mode
equal to 0400. This leads to the possibility of userspace
modifying the file, so let's use the newly created
debugfs_create_mode() helper here to fix this.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c