summaryrefslogtreecommitdiff
path: root/fs/smb/server/connection.h
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-06-23 20:07:58 +0200
committerSteve French <stfrench@microsoft.com>2024-07-14 18:00:35 -0500
commit051d469be1b355ffc62fcd9c82195230c780228a (patch)
treec5449d07734e5d16e9d45f2f4201fc987baf6926 /fs/smb/server/connection.h
parentac5399d48616644cb6ddfe39f8babe807d5f5cbd (diff)
ksmbd: Constify struct ksmbd_transport_ops
'struct ksmbd_transport_ops' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 52184 2085 256 54525 d4fd fs/smb/server/transport_rdma.o After: ===== text data bss dec hex filename 52260 2021 256 54537 d509 fs/smb/server/transport_rdma.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server/connection.h')
-rw-r--r--fs/smb/server/connection.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/smb/server/connection.h b/fs/smb/server/connection.h
index 0e04cf8b1d89..5c2845e47cf2 100644
--- a/fs/smb/server/connection.h
+++ b/fs/smb/server/connection.h
@@ -133,8 +133,8 @@ struct ksmbd_transport_ops {
};
struct ksmbd_transport {
- struct ksmbd_conn *conn;
- struct ksmbd_transport_ops *ops;
+ struct ksmbd_conn *conn;
+ const struct ksmbd_transport_ops *ops;
};
#define KSMBD_TCP_RECV_TIMEOUT (7 * HZ)