From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: ChenXiaoSong <chenxiaosong@chenxiaosong.com>
Cc: smfrench@gmail.com, linkinjeon@kernel.org, pc@manguebit.org,
ronniesahlberg@gmail.com, sprasad@microsoft.com, tom@talpey.com,
bharathsm@microsoft.com, senozhatsky@chromium.org,
dhowells@redhat.com, metze@samba.org, gael.blivet@gmail.com,
linux-cifs@vger.kernel.org
Subject: Re: [PATCH v2 1/3] smb/server: fix signing when a response uses more than one iov
Date: Fri, 17 Jul 2026 11:03:51 +0300 [thread overview]
Message-ID: <alnh59UIBda8vwPp@ashevche-desk.local> (raw)
In-Reply-To: <7d806e83-2535-433d-8aa3-f8b452ecbb83@chenxiaosong.com>
On Fri, Jul 17, 2026 at 07:43:15AM +0800, ChenXiaoSong wrote:
> The warning is triggered only when invalid arguments are passed.
Can you elaborate? The second part is the same check as it's done in
the for-loop body. The first part checks if we ever go into that loop,
so the logic here is either we have an invalid input (we skip the loop)
or always true due to repetition of the check inside, meaning that
the loop passed without finding the match.
So, what's the point?
> 在 2026/7/17 4:24, Andy Shevchenko 写道:
> > > + WARN_ON_ONCE(work->iov_idx < 1 ||
> > > + work->iov[work->iov_idx].iov_base != hdr);
> > The second part of this check is basically always true. What's the point?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-07-17 8:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 0:11 [PATCH v2 0/3] smb/server: fix some bugs in preparation for change notify support ChenXiaoSong
2026-07-16 0:11 ` [PATCH v2 1/3] smb/server: fix signing when a response uses more than one iov ChenXiaoSong
2026-07-16 20:24 ` Andy Shevchenko
2026-07-16 23:43 ` ChenXiaoSong
2026-07-17 8:03 ` Andy Shevchenko [this message]
2026-07-17 8:58 ` ChenXiaoSong
2026-07-16 0:11 ` [PATCH v2 2/3] smb/server: cancel async requests when closing connection ChenXiaoSong
2026-07-16 2:13 ` Namjae Jeon
2026-07-16 2:27 ` ChenXiaoSong
2026-07-16 0:11 ` [PATCH v2 3/3] smb/server: stop new async work " ChenXiaoSong
2026-07-16 2:25 ` Namjae Jeon
2026-07-16 2:33 ` ChenXiaoSong
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=alnh59UIBda8vwPp@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=bharathsm@microsoft.com \
--cc=chenxiaosong@chenxiaosong.com \
--cc=dhowells@redhat.com \
--cc=gael.blivet@gmail.com \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.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