]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: Fix kmap usage
authorIra Weiny <ira.weiny@intel.com>
Tue, 11 Aug 2020 00:02:58 +0000 (17:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Aug 2020 17:20:34 +0000 (10:20 -0700)
commit9c5805df4b99330021f3e380e5b0ef5ce9daafb9
treeb0fee16b5e902c40afff53b91688540a9b411b00
parent2246acb968171506c8d75735ed81ee54b94dddc3
net/tls: Fix kmap usage

When MSG_OOB is specified to tls_device_sendpage() the mapped page is
never unmapped.

Hold off mapping the page until after the flags are checked and the page
is actually needed.

Fixes: e31ec02c9978 ("net/tls: Add generic NIC offload infrastructure")
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_device.c