X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2Fsunrpc%2Fsvc.c;fp=net%2Fsunrpc%2Fsvc.c;h=b08419e1fc68456c545575a2a8505923729161ed;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=b76a227dd3ad9aac842f988874bc66cbb27e4a7b;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index b76a227dd..b08419e1f 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -32,8 +32,9 @@ svc_create(struct svc_program *prog, unsigned int bufsize) int vers; unsigned int xdrsize; - if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL))) + if (!(serv = kmalloc(sizeof(*serv), GFP_KERNEL))) return NULL; + memset(serv, 0, sizeof(*serv)); serv->sv_name = prog->pg_name; serv->sv_program = prog; serv->sv_nrthreads = 1; @@ -158,10 +159,11 @@ svc_create_thread(svc_thread_fn func, struct svc_serv *serv) struct svc_rqst *rqstp; int error = -ENOMEM; - rqstp = kzalloc(sizeof(*rqstp), GFP_KERNEL); + rqstp = kmalloc(sizeof(*rqstp), GFP_KERNEL); if (!rqstp) goto out; + memset(rqstp, 0, sizeof(*rqstp)); init_waitqueue_head(&rqstp->rq_wait); if (!(rqstp->rq_argp = kmalloc(serv->sv_xdrsize, GFP_KERNEL)) @@ -278,10 +280,7 @@ svc_process(struct svc_serv *serv, struct svc_rqst *rqstp) rqstp->rq_res.page_base = 0; rqstp->rq_res.page_len = 0; rqstp->rq_res.buflen = PAGE_SIZE; - rqstp->rq_res.tail[0].iov_base = NULL; rqstp->rq_res.tail[0].iov_len = 0; - /* Will be turned off only in gss privacy case: */ - rqstp->rq_sendfile_ok = 1; /* tcp needs a space for the record length... */ if (rqstp->rq_prot == IPPROTO_TCP) svc_putu32(resv, 0);