lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[079/116] SUNRPC: Fix a potential memory leak in auth_gss
    2.6.32-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Trond Myklebust <Trond.Myklebust@netapp.com>

    commit cdead7cf12896c0e50a8be2e52de52c364603095 upstream.

    The function alloc_enc_pages() currently fails to release the pointer
    rqstp->rq_enc_pages in the error path.

    Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
    Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/sunrpc/auth_gss/auth_gss.c | 5 ++---
    1 file changed, 2 insertions(+), 3 deletions(-)

    --- a/net/sunrpc/auth_gss/auth_gss.c
    +++ b/net/sunrpc/auth_gss/auth_gss.c
    @@ -1273,9 +1273,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
    rqstp->rq_release_snd_buf = priv_release_snd_buf;
    return 0;
    out_free:
    - for (i--; i >= 0; i--) {
    - __free_page(rqstp->rq_enc_pages[i]);
    - }
    + rqstp->rq_enc_pages_num = i;
    + priv_release_snd_buf(rqstp);
    out:
    return -EAGAIN;
    }



    \
     
     \ /
      Last update: 2010-03-31 02:01    [W:0.023 / U:62.988 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site