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>
This commit is contained in:

committed by
Anna Schumaker

parent
9ae7d8ff29
commit
511e936bf2
@@ -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),
|
||||
|
Reference in New Issue
Block a user