Thread (12 messages) 12 messages, 3 authors, 2021-11-01

Re: [PATCH net-next v2 2/4] ethtool: handle info/flash data copying outside rtnl_lock

From: Leon Romanovsky <leon@kernel.org>
Date: 2021-10-31 06:25:01

On Sat, Oct 30, 2021 at 10:18:49AM -0700, Jakub Kicinski wrote:
We need to increase the lifetime of the data for .get_info
and .flash_update beyond their handlers inside rtnl_lock.

Allocate a union on the heap and use it instead.

Note that we now copy the ethcmd before we lookup dev,
hopefully there is no crazy user space depending on error
codes.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 net/ethtool/ioctl.c | 110 +++++++++++++++++++++++++++-----------------
 1 file changed, 69 insertions(+), 41 deletions(-)
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help