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]

 



On 1/25/2023 9:02 AM, David Howells 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.

Do you have any logging from the softRoCE runs? I'd suspect some
kind of RDMA-specific scatter/gather overflow which might be
server-side as easily as client-side.

On client, try:
  echo 0x1ff >/sys/module/cifs/parameters/smbd_logging_class

On server:
   ksmbd.control -d conn
   ksmbd.control -d rdma

---
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;
  }
/*





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

  Powered by Linux