From: Greg KH <gregkh@linuxfoundation.org>
To: David Howells <dhowells@redhat.com>
Cc: Steve French <sfrench@samba.org>,
Stefan Metzmacher <metze@samba.org>,
Paulo Alcantara <pc@manguebit.org>, Tom Talpey <tom@talpey.com>,
linux-cifs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] smb: client: Fix error cleanup in smb_extract_iter_to_rdma()
Date: Fri, 24 Apr 2026 12:02:35 +0200 [thread overview]
Message-ID: <2026042426-prance-each-273d@gregkh> (raw)
In-Reply-To: <3418418.1777024571@warthog.procyon.org.uk>
On Fri, Apr 24, 2026 at 10:56:11AM +0100, David Howells wrote:
>
> Fix smb_extract_iter_to_rdma() to use pre-decrement, not post-decrement, so
> that it cleans up the correct slots.
>
> Fixes: e5fbdde43017 ("cifs: Add a function to build an RDMA SGE list from an iterator")
> Closes: https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Steve French <sfrench@samba.org>
> cc: Stefan Metzmacher <metze@samba.org>
> cc: Paulo Alcantara <pc@manguebit.org>
> cc: Tom Talpey <tom@talpey.com>
> cc: linux-cifs@vger.kernel.org
> cc: linux-fsdevel@vger.kernel.org
> ---
> fs/smb/client/smbdirect.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/smbdirect.c b/fs/smb/client/smbdirect.c
> index 7d5f66bdbb30..4978755c035c 100644
> --- a/fs/smb/client/smbdirect.c
> +++ b/fs/smb/client/smbdirect.c
> @@ -3394,7 +3394,7 @@ static ssize_t smb_extract_iter_to_rdma(struct iov_iter *iter, size_t len,
>
> if (ret < 0) {
> while (rdma->nr_sge > before) {
> - struct ib_sge *sge = &rdma->sge[rdma->nr_sge--];
> + struct ib_sge *sge = &rdma->sge[--rdma->nr_sge];
>
> ib_dma_unmap_single(rdma->device, sge->addr, sge->length,
> rdma->direction);
>
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
next prev parent reply other threads:[~2026-04-24 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 9:56 [PATCH] smb: client: Fix error cleanup in smb_extract_iter_to_rdma() David Howells
2026-04-24 10:02 ` Greg KH [this message]
2026-04-24 11:39 ` Stefan Metzmacher
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=2026042426-prance-each-273d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=dhowells@redhat.com \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=sfrench@samba.org \
--cc=stable@vger.kernel.org \
--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