[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 31 Oct 2021 08:24:54 +0200
From: Leon Romanovsky <leon@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, jiri@...nulli.us,
mkubecek@...e.cz, andrew@...n.ch, f.fainelli@...il.com
Subject: Re: [PATCH net-next v2 2/4] ethtool: handle info/flash data copying
outside rtnl_lock
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@...nel.org>
> ---
> net/ethtool/ioctl.c | 110 +++++++++++++++++++++++++++-----------------
> 1 file changed, 69 insertions(+), 41 deletions(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Powered by blists - more mailing lists