linux/lib/mpi
Stephan Mueller dea3eb8b45 lib/mpi: kunmap after finishing accessing buffer
Using sg_miter_start and sg_miter_next, the buffer of an SG is kmap'ed
to *buff. The current code calls sg_miter_stop (and thus kunmap) on the
SG entry before the last access of *buff.

The patch moves the sg_miter_stop call after the last access to *buff to
ensure that the memory pointed to by *buff is still mapped.

Fixes: 4816c94064 ("lib/mpi: Fix SG miter leak")
Cc: <stable@vger.kernel.org>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-08-22 14:45:01 +08:00
..
generic_mpih-add1.c
generic_mpih-lshift.c
generic_mpih-mul1.c
generic_mpih-mul2.c
generic_mpih-mul3.c
generic_mpih-rshift.c
generic_mpih-sub1.c
longlong.h lib/mpi: avoid assembler warning 2016-02-28 03:26:34 +08:00
Makefile
mpi-bit.c
mpi-cmp.c
mpi-inline.h lib/mpi: use "static inline" instead of "extern inline" 2016-02-28 03:26:34 +08:00
mpi-internal.h lib/mpi: use "static inline" instead of "extern inline" 2016-02-28 03:26:34 +08:00
mpi-pow.c mpi: Fix NULL ptr dereference in mpi_powm() [ver #3] 2016-11-25 12:57:50 +11:00
mpicoder.c lib/mpi: kunmap after finishing accessing buffer 2017-08-22 14:45:01 +08:00
mpih-cmp.c
mpih-div.c
mpih-mul.c
mpiutil.c MPILIB: add mpi_read_buf() and mpi_get_size() helpers 2015-06-16 14:35:06 +08:00