linux/net/devlink
Jiri Pirko 633d76ad01 devlink: remove reload failed checks in params get/set callbacks
The checks in question were introduced by:
commit 6b4db2e528 ("devlink: Fix use-after-free after a failed reload").
That fixed an issue of reload with mlxsw driver.

Back then, that was a valid fix, because there was a limitation
in place that prevented drivers from registering/unregistering params
when devlink instance was registered.

It was possible to do the fix differently by changing drivers to
register/unregister params in appropriate places making sure the ops
operate only on memory which is allocated and initialized. But that,
as a dependency, would require to remove the limitation mentioned above.

Eventually, this limitation was lifted by:
commit 1d18bb1a4d ("devlink: allow registering parameters after the instance")

Also, the alternative fix (which also fixed another issue) was done by:
commit 74cbc3c03c ("mlxsw: spectrum_acl_tcam: Move devlink param to TCAM code").

Therefore, the checks are no longer relevant. Each driver should make
sure to have the params registered only when the memory the ops
are working with is allocated and initialized.

So remove the checks.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-07-14 09:08:09 +01:00
..
core.c devlink: Fix crash with CONFIG_NET_NS=n 2023-05-16 19:57:52 -07:00
dev.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net 2023-02-17 11:06:39 +00:00
devl_internal.h devlink: change per-devlink netdev notifier to static one 2023-05-11 18:06:50 -07:00
health.c devlink: make health report on unregistered instance warn just once 2023-05-31 22:34:22 -07:00
leftover.c devlink: remove reload failed checks in params get/set callbacks 2023-07-14 09:08:09 +01:00
Makefile
netlink.c