mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Cc: v9fs@lists.linux.dev, Eric Van Hensbergen <ericvh@kernel.org>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Christian Schoenebeck <linux_oss@crudebyte.com>,
	linux-kernel@vger.kernel.org,
	Yuxiang Yang <yangyx22@mails.tsinghua.edu.cn>,
	Ao Wang <wangao@seu.edu.cn>, Xuewei Feng <fengxw06@126.com>,
	Qi Li <qli01@tsinghua.edu.cn>, Ke Xu <xuke@tsinghua.edu.cn>,
	stable@vger.kernel.org
Subject: Re: [PATCH] net/9p/usbg: fix prefix matching in device lookup
Date: Sun, 13 Sep 2026 17:34:31 +0900	[thread overview]
Message-ID: <aqZgF17zCzbFwIMW@codewreck.org> (raw)
In-Reply-To: <20260607121907.12588-1-zhaoyz24@mails.tsinghua.edu.cn>

Yizhou Zhao wrote on Sun, Jun 07, 2026 at 08:19:04PM +0800:
> p9_usbg_create() matches the mount source against registered usb9pfs
> instance tags with strncmp() and the length of the caller supplied source.
> That accepts any prefix of the registered tag.
> 
> For example, a gadget instance tagged "secret_channel" can be selected with
> "s", "sec", or any other non-empty prefix.  Once selected, the instance is
> marked in use and the client is attached to that transport.  This differs
> from the configfs tag lookup path, which uses strcmp() and therefore
> requires an exact tag match.
> 
> Require an exact tag match in p9_usbg_create() as well.
> 
> Fixes: a3be076dc174 ("net/9p/usbg: Add new usb gadget function transport")
> Cc: stable@vger.kernel.org
> Reported-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
> Reported-by: Yuxiang Yang <yangyx22@mails.tsinghua.edu.cn>
> Reported-by: Ao Wang <wangao@seu.edu.cn>
> Reported-by: Xuewei Feng <fengxw06@126.com>
> Reported-by: Qi Li <qli01@tsinghua.edu.cn>
> Reported-by: Ke Xu <xuke@tsinghua.edu.cn>
> Assisted-by: GLM:GLM-5.1
> Signed-off-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>

Thanks, there was another identical patch later so I did the same
(actually just adding co-authored-by, I kept the commit message the
same)

I'm honestly not sure what to do in these case but there's probably no
harm in overcrediting...

https://lore.kernel.org/r/20260719040346.88295-1-liu.yun@linux.dev
https://github.com/martinetd/linux/commit/9ee83ef8d24f11feb55fd0d222c0ec19f09dbd3f

-- 
Dominique

  reply	other threads:[~2026-09-13  8:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-07 12:19 Yizhou Zhao
2026-09-13  8:34 ` Dominique Martinet [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-06-07 12:17 Yizhou Zhao

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=aqZgF17zCzbFwIMW@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=ericvh@kernel.org \
    --cc=fengxw06@126.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=qli01@tsinghua.edu.cn \
    --cc=stable@vger.kernel.org \
    --cc=v9fs@lists.linux.dev \
    --cc=wangao@seu.edu.cn \
    --cc=xuke@tsinghua.edu.cn \
    --cc=yangyx22@mails.tsinghua.edu.cn \
    --cc=zhaoyz24@mails.tsinghua.edu.cn \
    /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®