diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-12 16:36:49 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2017-07-13 22:57:57 +0300 |
commit | 511e936bf2b3e8be2a3160ace3d86be07962a7a8 (patch) | |
tree | b9eabbc23dbaa937917d01f8f8dc5d8a60124b95 /fs/nfs/nfs2xdr.c | |
parent | 9ae7d8ff2948c4514b9a6bfef7f1a548ea6ab190 (diff) | |
download | linux-511e936bf2b3e8be2a3160ace3d86be07962a7a8.tar.xz |
sunrpc: mark all struct rpc_procinfo instances as const
struct rpc_procinfo contains function pointers, and marking it as
constant avoids it being able to be used as an attach vector for
code injections.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs2xdr.c')
-rw-r--r-- | fs/nfs/nfs2xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 16b4526299c1..c8a7e98c1371 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c @@ -1152,7 +1152,7 @@ static int nfs_stat_to_errno(enum nfs_stat status) .p_statidx = NFSPROC_##proc, \ .p_name = #proc, \ } -struct rpc_procinfo nfs_procedures[] = { +const struct rpc_procinfo nfs_procedures[] = { PROC(GETATTR, fhandle, attrstat, 1), PROC(SETATTR, sattrargs, attrstat, 0), PROC(LOOKUP, diropargs, diropres, 2), |