Shalom Toledo
a22712a962
mlxsw: core: Fix devlink unregister flow
...
After a failed reload, the driver is still registered to devlink, its
devlink instance is still allocated and the 'reload_fail' flag is set.
Then, in the next reload try, the driver's allocated devlink instance will
be freed without unregistering from devlink and its components (e.g,
resources). This scenario can cause a use-after-free if the user tries to
execute command via devlink user-space tool.
Fix by not freeing the devlink instance during reload (failed or not).
Fixes: 24cc68ad6c ("mlxsw: core: Add support for reload")
Signed-off-by: Shalom Toledo <shalomt@mellanox.com >
Reviewed-by: Jiri Pirko <jiri@mellanox.com >
Signed-off-by: Ido Schimmel <idosch@mellanox.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2018-10-29 20:48:00 -07:00
..
2018-10-25 06:50:48 -07:00
2018-10-26 08:21:04 -06:00
2018-10-18 15:39:10 -07:00
2018-10-26 16:26:32 -07:00
2018-10-26 14:36:21 -07:00
2018-10-24 14:43:41 +01:00
2018-10-29 15:16:01 -07:00
2018-10-25 11:17:40 -06:00
2018-10-27 09:24:24 -07:00
2018-10-29 15:16:01 -07:00
2018-10-25 18:01:29 -07:00
2018-10-23 16:16:40 +01:00
2018-10-26 16:26:32 -07:00
2018-10-25 16:43:35 -07:00
2018-10-25 06:50:48 -07:00
2018-10-29 15:16:01 -07:00
2018-10-29 15:16:01 -07:00
2018-10-16 11:13:50 +02:00
2018-10-25 06:50:48 -07:00
2018-10-29 14:29:58 -07:00
2018-10-29 14:29:58 -07:00
2018-10-15 20:54:17 +02:00
2018-10-23 09:42:05 +01:00
2018-10-11 12:12:55 +02:00
2018-10-29 14:44:03 -07:00
2018-10-23 13:32:18 +01:00
2018-10-29 10:38:10 -07:00
2018-10-26 16:25:19 -07:00
2018-10-28 11:35:40 -07:00
2018-10-26 19:33:41 -07:00
2018-10-29 08:25:00 -07:00
2018-10-24 14:43:41 +01:00
2018-10-26 20:51:36 +02:00
2018-10-09 08:25:08 -06:00
2018-10-19 00:56:17 +11:00
2018-10-29 10:30:44 -07:00
2018-10-26 13:00:44 -07:00
2018-10-29 14:29:58 -07:00
2018-10-25 06:19:15 -07:00
2018-10-29 14:44:03 -07:00
2018-10-23 13:32:18 +01:00
2018-10-23 01:09:22 +01:00
2018-10-23 08:45:05 +01:00
2018-10-29 20:48:00 -07:00
2018-10-23 13:28:53 -05:00
2018-10-25 06:31:56 -07:00
2018-10-25 06:50:48 -07:00
2018-10-15 15:56:15 +02:00
2018-10-29 10:42:20 -07:00
2018-10-17 17:22:26 +02:00
2018-10-28 11:35:40 -07:00
2018-10-26 14:36:21 -07:00
2018-10-22 17:30:06 +01:00
2018-10-26 08:14:13 -07:00
2018-10-23 08:45:05 +01:00
2018-10-26 09:11:43 -07:00
2018-10-26 12:09:58 -07:00
2018-10-23 13:32:18 +01:00
2018-10-28 19:20:06 -07:00
2018-10-23 01:54:44 +01:00
2018-10-29 15:16:01 -07:00
2018-10-25 02:35:42 +02:00
2018-10-25 17:57:35 -07:00
2018-10-07 22:42:00 -07:00
2018-10-26 12:43:13 -07:00
2018-10-29 15:16:01 -07:00
2018-10-25 06:19:15 -07:00
2018-10-29 14:29:58 -07:00
2018-10-25 07:40:30 -07:00
2018-10-11 09:16:44 -07:00
2018-10-26 12:04:29 -07:00
2018-10-08 15:33:21 +02:00
2018-10-29 10:42:20 -07:00
2018-10-26 08:14:13 -07:00
2018-10-20 20:47:02 +11:00
2018-10-07 21:31:32 -07:00
2018-10-29 14:29:58 -07:00
2018-10-15 20:50:32 +02:00
2018-10-22 10:16:28 +02:00
2018-10-23 17:54:58 +01:00