]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: algif - avoid excessive use of socket buffer in skcipher
authorOndrej Kozina <okozina@redhat.com>
Mon, 25 Aug 2014 09:49:54 +0000 (11:49 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Sep 2014 07:07:10 +0000 (15:07 +0800)
commite2cffb5f493a8b431dc87124388ea59b79f0bccb
treea671bcf66969ac8af41a1b887f061f18bf64c1c2
parentab81873974afa3ce7bd8669580b06d33353f1e7c
crypto: algif - avoid excessive use of socket buffer in skcipher

On archs with PAGE_SIZE >= 64 KiB the function skcipher_alloc_sgl()
fails with -ENOMEM no matter what user space actually requested.
This is caused by the fact sock_kmalloc call inside the function tried
to allocate more memory than allowed by the default kernel socket buffer
size (kernel param net.core.optmem_max).

Signed-off-by: Ondrej Kozina <okozina@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algif_skcipher.c