net/mlx5: FPGA, tls, hold rcu read lock a bit longer
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 20 Mar 2019 05:09:05 +0000 (22:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Apr 2019 07:36:32 +0000 (09:36 +0200)
commit7cfddb81a81727362e0e4d3aea03af7d7d96d73f
treee00bf406c96847b84183412ee890821939323e8c
parentd1785bea2f3419507827b009b483a53fde80b928
net/mlx5: FPGA, tls, hold rcu read lock a bit longer

[ Upstream commit 31634bf5dcc418b5b2cacd954394c0c4620db6a2 ]

To avoid use-after-free, hold the rcu read lock until we are done copying
flow data into the command buffer.

Fixes: ab412e1dd7db ("net/mlx5: Accel, add TLS rx offload routines")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c