Re: [PATCH] cifs: Fix oops due to uncleared server->smbd_conn in reconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



minor cleanup of description and pushed to cifs-2.6.git for-next

On Wed, Jan 25, 2023 at 8:05 AM David Howells <dhowells@xxxxxxxxxx> wrote:
>
> Hi Steve,
>
> That attached patch stops the kernel from oopsing, but it still tries
> endlessly to send with softRoCE.  I'm having better luck with softIWarp - with
> some other patches, I can run generic/001 to completion with that transport.
>
> David
>
> ---
> commit 820cb3802c6a73c54e2e215b674eb5870fd5d0e5
> Author: David Howells <dhowells@xxxxxxxxxx>
> Date:   Wed Jan 25 12:42:07 2023 +0000
>
>     cifs: Fix oops due to uncleared server->smbd_conn in reconnect
>
>     In smbd_destroy(), clear the server->smbd_conn pointer after freeing the
>     smbd_connection struct that it points to so that reconnection doesn't get
>     confused.
>
>     Fixes: 8ef130f9ec27 ("CIFS: SMBD: Implement function to destroy a SMB Direct connection")
>     Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
>     cc: Long Li <longli@xxxxxxxxxxxxx>
>     cc: Steve French <smfrench@xxxxxxxxx>
>     cc: Pavel Shilovsky <pshilov@xxxxxxxxxxxxx>
>     cc: Ronnie Sahlberg <lsahlber@xxxxxxxxxx>
>     cc: linux-cifs@xxxxxxxxxxxxxxx
>
> diff --git a/fs/cifs/smbdirect.c b/fs/cifs/smbdirect.c
> index 90789aaa6567..8c816b25ce7c 100644
> --- a/fs/cifs/smbdirect.c
> +++ b/fs/cifs/smbdirect.c
> @@ -1405,6 +1405,7 @@ void smbd_destroy(struct TCP_Server_Info *server)
>         destroy_workqueue(info->workqueue);
>         log_rdma_event(INFO,  "rdma session destroyed\n");
>         kfree(info);
> +       server->smbd_conn = NULL;
>  }
>
>  /*
>


-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux