[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191108.141224.1561483712458439557.davem@davemloft.net>
Date: Fri, 08 Nov 2019 14:12:24 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jiri@...nulli.us
Cc: netdev@...r.kernel.org, jakub.kicinski@...ronome.com,
idosch@...lanox.com, mlxsw@...lanox.com
Subject: Re: [patch net-next] devlink: disallow reload operation during
device cleanup
From: Jiri Pirko <jiri@...nulli.us>
Date: Fri, 8 Nov 2019 21:42:43 +0100
> From: Jiri Pirko <jiri@...lanox.com>
>
> There is a race between driver code that does setup/cleanup of device
> and devlink reload operation that in some drivers works with the same
> code. Use after free could we easily obtained by running:
>
> while true; do
> echo 10 > /sys/bus/netdevsim/new_device
> devlink dev reload netdevsim/netdevsim10 &
> echo 10 > /sys/bus/netdevsim/del_device
> done
>
> Fix this by enabling reload only after setup of device is complete and
> disabling it at the beginning of the cleanup process.
>
> Reported-by: Ido Schimmel <idosch@...lanox.com>
> Fixes: 2d8dc5bbf4e7 ("devlink: Add support for reload")
> Signed-off-by: Jiri Pirko <jiri@...lanox.com>
Applied.
Powered by blists - more mailing lists