From: Avi Weiss <thnkslprpt@gmail.com>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>,
Christian Gromm <christian.gromm@microchip.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] most: configfs: ignore repeated create_link requests
Date: Wed, 28 Oct 2026 13:51:20 +0200 [thread overview]
Message-ID: <20261028115119.902049-2-thnkslprpt@gmail.com> (raw)
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
reply other threads:[~2026-10-28 11:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261028115119.902049-2-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=christian.gromm@microchip.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=parthiban.veerasooran@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®