diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2021-12-16 02:26:43 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-12-29 05:47:22 +0100 |
commit | a58b45a4dbfd0bf2ebb157789da4d8e6368afb1b (patch) | |
tree | 6c30e65656d72b3977d7481e400961d677011439 /fs/ksmbd/mgmt | |
parent | ksmbd: Remove unused fields from ksmbd_file struct definition (diff) | |
download | linux-a58b45a4dbfd0bf2ebb157789da4d8e6368afb1b.tar.xz linux-a58b45a4dbfd0bf2ebb157789da4d8e6368afb1b.zip |
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')
-rw-r--r-- | fs/ksmbd/mgmt/user_config.c | 10 | ||||
-rw-r--r-- | fs/ksmbd/mgmt/user_config.h | 1 |
2 files changed, 11 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; +} diff --git a/fs/ksmbd/mgmt/user_config.h b/fs/ksmbd/mgmt/user_config.h index aff80b029579..6a44109617f1 100644 --- a/fs/ksmbd/mgmt/user_config.h +++ b/fs/ksmbd/mgmt/user_config.h @@ -64,4 +64,5 @@ struct ksmbd_user *ksmbd_login_user(const char *account); struct ksmbd_user *ksmbd_alloc_user(struct ksmbd_login_response *resp); void ksmbd_free_user(struct ksmbd_user *user); int ksmbd_anonymous_user(struct ksmbd_user *user); +bool ksmbd_compare_user(struct ksmbd_user *u1, struct ksmbd_user *u2); #endif /* __USER_CONFIG_MANAGEMENT_H__ */ |