]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
devlink: avoid potential loop in devlink_rel_nested_in_notify_work()
authorJiri Pirko <jiri@nvidia.com>
Mon, 5 Feb 2024 17:11:14 +0000 (18:11 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 7 Feb 2024 02:45:16 +0000 (18:45 -0800)
commit58086721b7781c3e35b19c9b78c8f5a791070ba3
tree9b9fe7671a4a1b008d310d2b1405ca45ec248da1
parent1279f9d9dec2d7462823a18c29ad61359e0a007d
devlink: avoid potential loop in devlink_rel_nested_in_notify_work()

In case devlink_rel_nested_in_notify_work() can not take the devlink
lock mutex. Convert the work to delayed work and in case of reschedule
do it jiffie later and avoid potential looping.

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Fixes: c137743bce02 ("devlink: introduce object and nested devlink relationship infra")
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240205171114.338679-1-jiri@resnulli.us
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/devlink/core.c