• David Howells's avatar
    crypto: af_alg: Pin pages rather than ref'ing if appropriate · f9e7a5fa
    David Howells authored
    Convert AF_ALG to use iov_iter_extract_pages() instead of
    iov_iter_get_pages().  This will pin pages or leave them unaltered rather
    than getting a ref on them as appropriate to the iterator.
    
    The pages need to be pinned for DIO-read rather than having refs taken on
    them to prevent VM copy-on-write from malfunctioning during a concurrent
    fork() (the result of the I/O would otherwise end up only visible to the
    child process and not the parent).
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    cc: Herbert Xu <herbert@gondor.apana.org.au>
    cc: "David S. Miller" <davem@davemloft.net>
    cc: Eric Dumazet <edumazet@google.com>
    cc: Jakub Kicinski <kuba@kernel.org>
    cc: Paolo Abeni <pabeni@redhat.com>
    cc: Jens Axboe <axboe@kernel.dk>
    cc: Matthew Wilcox <willy@infradead.org>
    cc: linux-crypto@vger.kernel.org
    cc: netdev@vger.kernel.org
    Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    f9e7a5fa
af_alg.c 29.6 KB