diff options
author | Stephan Mueller <smueller@chronox.de> | 2017-08-10 06:06:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-07 06:35:40 (GMT) |
commit | 31decdcd83695b6a0e84794ecc470c454b4088f7 (patch) | |
tree | 49a6fa370abe7d9c2f2b7cd42795f95ec93c85e5 /drivers/gpu | |
parent | 9e2788ce8f17485ddd506b639eeea38b729baf2e (diff) | |
download | linux-31decdcd83695b6a0e84794ecc470c454b4088f7.tar.xz |
lib/mpi: kunmap after finishing accessing buffer
commit dea3eb8b452e36cf2dd572b0a797915ccf452ae6 upstream.
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: 4816c9406430 ("lib/mpi: Fix SG miter leak")
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
0 files changed, 0 insertions, 0 deletions