Skip to content

Commit

Permalink
ksmbd: fix kernel oops in ksmbd_rpc_ioctl/rap()
Browse files Browse the repository at this point in the history
"ksmbd: remove macros in transport_ipc.c" commit change msg to req in
ksmbd_rpc_ioctl/rap(). This will cause kernel oops when running smbclient
-L test.

Signed-off-by: Namjae Jeon <[email protected]>
  • Loading branch information
namjaejeon committed Jul 2, 2021
1 parent b9a7a8c commit 2a9112f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions transport_ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ struct ksmbd_rpc_command *ksmbd_rpc_ioctl(struct ksmbd_session *sess, int handle
return NULL;

msg->type = KSMBD_EVENT_RPC_REQUEST;
req = (struct ksmbd_rpc_command *)req->payload;
req = (struct ksmbd_rpc_command *)msg->payload;
req->handle = handle;
req->flags = ksmbd_session_rpc_method(sess, handle);
req->flags |= rpc_context_flags(sess);
Expand All @@ -776,7 +776,7 @@ struct ksmbd_rpc_command *ksmbd_rpc_rap(struct ksmbd_session *sess, void *payloa
return NULL;

msg->type = KSMBD_EVENT_RPC_REQUEST;
req = (struct ksmbd_rpc_command *)req->payload;
req = (struct ksmbd_rpc_command *)msg->payload;
req->handle = ksmbd_acquire_id(&ipc_ida);
req->flags = rpc_context_flags(sess);
req->flags |= KSMBD_RPC_RAP_METHOD;
Expand Down

0 comments on commit 2a9112f

Please sign in to comment.