Skip to content

Commit

Permalink
ksmbd: test
Browse files Browse the repository at this point in the history
Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Aug 15, 2024
1 parent 6ab4113 commit ebaf264
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions mgmt/user_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,12 @@ void destroy_previous_session(struct ksmbd_conn *conn,
memcmp(user->passkey, prev_user->passkey, user->passkey_sz))
goto out;

ksmbd_all_conn_set_status(sess_id, KSMBD_SESS_NEED_RECONNECT);
ksmbd_conn_wait_idle(conn, sess_id);

ksmbd_destroy_file_table(&prev_sess->file_table);
prev_sess->state = SMB2_SESSION_EXPIRED;
ksmbd_all_conn_set_status(sess_id, KSMBD_SESS_NEED_NEGOTIATE);
ksmbd_launch_ksmbd_durable_scavenger();
out:
up_write(&conn->session_lock);
Expand Down
4 changes: 3 additions & 1 deletion smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ int smb2_sess_setup(struct ksmbd_work *work)
unsigned int negblob_len, negblob_off;
int rc = 0;

ksmbd_debug(SMB, "Received request for session setup\n");
pr_err("Received request for session setup\n");

WORK_BUFFERS(work, req, rsp);

Expand Down Expand Up @@ -2939,6 +2939,8 @@ int smb2_open(struct ksmbd_work *work)

WORK_BUFFERS(work, req, rsp);

msleep(1000 *5 );

if (req->hdr.NextCommand && !work->next_smb2_rcv_hdr_off &&
(req->hdr.Flags & SMB2_FLAGS_RELATED_OPERATIONS)) {
ksmbd_debug(SMB, "invalid flag in chained command\n");
Expand Down
1 change: 1 addition & 0 deletions vfs_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,7 @@ void ksmbd_destroy_file_table(struct ksmbd_file_table *ft)
__close_file_table_ids(ft, NULL, session_fd_check);
idr_destroy(ft->idr);
kfree(ft->idr);
msleep(1000 * 100);
ft->idr = NULL;
}

Expand Down

0 comments on commit ebaf264

Please sign in to comment.