mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: Steve French <stfrench@microsoft.com>,
	Jean-Christophe Guillain <jean-christophe@guillain.net>,
	Paulo Alcantara <pc@manguebit.com>,
	Jeff Layton <jlayton@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	linux-cifs@vger.kernel.org, netfs@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs
Date: Tue, 25 Feb 2025 23:38:26 +0100	[thread overview]
Message-ID: <20250225223826.sm4445vrc56mfuwh@pali> (raw)
In-Reply-To: <2433838.1740522300@warthog.procyon.org.uk>

On Tuesday 25 February 2025 22:25:00 David Howells wrote:
>     
> Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather
> than queuing the subrequest work item (which is unset).  Also call the
> I/O progress tracepoint.
> 
> Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
> Reported-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Steve French <stfrench@microsoft.com>
> cc: Pali Rohár <pali@kernel.org>
> cc: Paulo Alcantara <pc@manguebit.com>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: linux-cifs@vger.kernel.org
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org

Thanks! With this change, I cannot reproduce crash anymore.

Tested-by: Pali Rohár <pali@kernel.org>

Steve, could you please include this fix into some queue? This should be
merged into next -rc.

> ---
>  fs/smb/client/cifssmb.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
> index 6a3e287eabfa..bf9acea53ccb 100644
> --- a/fs/smb/client/cifssmb.c
> +++ b/fs/smb/client/cifssmb.c
> @@ -1338,7 +1338,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
>  	rdata->credits.value = 0;
>  	rdata->subreq.error = rdata->result;
>  	rdata->subreq.transferred += rdata->got_bytes;
> -	queue_work(cifsiod_wq, &rdata->subreq.work);
> +	trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
> +	netfs_read_subreq_terminated(&rdata->subreq);
>  	release_mid(mid);
>  	add_credits(server, &credits, 0);
>  }
> 

  parent reply	other threads:[~2025-02-25 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25 22:25 David Howells
2025-02-25 22:35 ` Paulo Alcantara
2025-02-25 22:38 ` Pali Rohár [this message]
2025-02-25 22:55   ` Steve French

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=20250225223826.sm4445vrc56mfuwh@pali \
    --to=pali@kernel.org \
    --cc=brauner@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=jean-christophe@guillain.net \
    --cc=jlayton@kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netfs@lists.linux.dev \
    --cc=pc@manguebit.com \
    --cc=stfrench@microsoft.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®