• Anna Schumaker's avatar
    SUNRPC: kmap() the xdr pages during decode · 61182c79
    Anna Schumaker authored
    If the pages are in HIGHMEM then we need to make sure they're mapped
    before trying to read data off of them, otherwise we could end up with a
    NULL pointer dereference.
    
    The downside to this is that we need an extra cleanup step at the end of
    decode to kunmap() the last page. I introduced an xdr_finish_decode()
    function to do this. Right now this function only calls the
    unmap_current_page() function, but other generic cleanup steps could be
    added in the future if we come across anything else.
    Reported-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    61182c79
clnt.c 79.2 KB