mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
sunrpc: Const-ify struct sv_serv_ops
Close an attack vector by moving the arrays of per-server methods to read-only memory. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
c1df609d9d
commit
afea5657c2
5 changed files with 13 additions and 13 deletions
|
|
@ -421,7 +421,7 @@ __svc_init_bc(struct svc_serv *serv)
|
|||
*/
|
||||
static struct svc_serv *
|
||||
__svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
|
||||
struct svc_serv_ops *ops)
|
||||
const struct svc_serv_ops *ops)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
unsigned int vers;
|
||||
|
|
@ -486,7 +486,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
|
|||
|
||||
struct svc_serv *
|
||||
svc_create(struct svc_program *prog, unsigned int bufsize,
|
||||
struct svc_serv_ops *ops)
|
||||
const struct svc_serv_ops *ops)
|
||||
{
|
||||
return __svc_create(prog, bufsize, /*npools*/1, ops);
|
||||
}
|
||||
|
|
@ -494,7 +494,7 @@ EXPORT_SYMBOL_GPL(svc_create);
|
|||
|
||||
struct svc_serv *
|
||||
svc_create_pooled(struct svc_program *prog, unsigned int bufsize,
|
||||
struct svc_serv_ops *ops)
|
||||
const struct svc_serv_ops *ops)
|
||||
{
|
||||
struct svc_serv *serv;
|
||||
unsigned int npools = svc_pool_map_get();
|
||||
|
|
|
|||
Loading…
Reference in a new issue