]> git.baikalelectronics.ru Git - kernel.git/commit
devlink: Avoid overwriting port attributes of registered port
authorParav Pandit <parav@nvidia.com>
Wed, 11 Nov 2020 03:47:44 +0000 (05:47 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 16:06:57 +0000 (08:06 -0800)
commite122b85e5cb816e5ba77aabe5fa4460e894d0e42
tree21791d4000eda8207664cbcb9461d1886dfee1ea
parent27d358a8f059a4f3c9584477316e4c8b991f9f42
devlink: Avoid overwriting port attributes of registered port

Cited commit in fixes tag overwrites the port attributes for the
registered port.

Avoid such error by checking registered flag before setting attributes.

Fixes: 6401bc463d63 ("devlink: Replace devlink_port_attrs_set parameters with a struct")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20201111034744.35554-1-parav@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/devlink.c