diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2021-12-16 04:26:43 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-12-29 07:47:22 +0300 |
commit | a58b45a4dbfd0bf2ebb157789da4d8e6368afb1b (patch) | |
tree | 6c30e65656d72b3977d7481e400961d677011439 /fs/ksmbd/mgmt/user_config.c | |
parent | 305f8bda15ebbe4004681286a5c67d0dc296c771 (diff) | |
download | linux-a58b45a4dbfd0bf2ebb157789da4d8e6368afb1b.tar.xz |
ksmbd: set RSS capable in FSCTL_QUERY_NETWORK_INTERFACE_INFO
Set RSS capable in FSCTL_QUERY_NETWORK_INTERFACE_INFO if netdev has
multi tx queues. And add ksmbd_compare_user() to avoid racy condition
issue in ksmbd_free_user(). because windows client is simultaneously used
to send session setup requests for multichannel connection.
Tested-by: Ziwei Xie <zw.xie@high-flyer.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/mgmt/user_config.c')
-rw-r--r-- | fs/ksmbd/mgmt/user_config.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ksmbd/mgmt/user_config.c b/fs/ksmbd/mgmt/user_config.c index 1019d3677d55..279d00feff21 100644 --- a/fs/ksmbd/mgmt/user_config.c +++ b/fs/ksmbd/mgmt/user_config.c @@ -67,3 +67,13 @@ int ksmbd_anonymous_user(struct ksmbd_user *user) return 1; return 0; } + +bool ksmbd_compare_user(struct ksmbd_user *u1, struct ksmbd_user *u2) +{ + if (strcmp(u1->name, u2->name)) + return false; + if (memcmp(u1->passkey, u2->passkey, u1->passkey_sz)) + return false; + + return true; +} |