* [PATCH] most: configfs: ignore repeated create_link requests
@ 2026-10-28 11:51 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-28 11:51 UTC (permalink / raw)
To: Parthiban Veerasooran, Christian Gromm
Cc: Greg Kroah-Hartman, linux-kernel, Avi Weiss
mdev_link_create_link_store() adds a link to mdev_link_list even when
create_link is already set. Two writes of 1 for a device that is not
yet present insert the same list node twice, triggering a warning
with CONFIG_DEBUG_LIST or corrupting the list without it.
Skip repeated requests until destroy_link has succeeded, allowing a
later create_link request to create the link again.
Fixes: acdbb8975373 ("staging: most: allow speculative configuration")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/most/configfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/most/configfs.c b/drivers/most/configfs.c
index 8f5158d95bc38..73794d2200125 100644
--- a/drivers/most/configfs.c
+++ b/drivers/most/configfs.c
@@ -122,6 +122,8 @@ static ssize_t mdev_link_create_link_store(struct config_item *item,
return ret;
if (!tmp)
return count;
+ if (mdev_link->create_link && !mdev_link->destroy_link)
+ return count;
ret = set_config_and_add_link(mdev_link);
if (ret && ret != -ENODEV)
return ret;
base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-28 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 11:51 [PATCH] most: configfs: ignore repeated create_link requests Avi Weiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®